TheSwamp

Code Red => VB(A) => Topic started by: jjs on April 27, 2007, 10:33:52 AM

Title: Retrieving and Setting Autocad Registry Settings
Post by: jjs on April 27, 2007, 10:33:52 AM
Having trouble figuring out the appname and section
Code: [Select]
varreturn = GetSetting("HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.1\ACAD-6006:409\Profiles\AutoCAD MEP (US Imperial)\Dialogs", "AecbElec55-DeviceAdd", "SymbolName", "test")
Anybody done this before want to give me a hand?
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: jjs on April 27, 2007, 10:47:34 AM
Thanks for the answer chuck

http://groups.google.com/group/autodesk.autocad.customization.vba/browse_thread/thread/20e611317263eafd/d0d36df3a154ae16%23d0d36df3a154ae16
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Chuck Gabriel on April 27, 2007, 12:26:25 PM
That was too easy.  :-)
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: jjs on April 27, 2007, 01:07:10 PM
Ok, got a more difficult one for you. I have it writing the value to the registry now. The problem is that autocad must not be reading from the registry each time. How do I force autocad to get its values from registry again.

The actual thing I am doing is with Autocad MEP deviceadd command. I am trying to set the devicestyle before I run the command so that it will use the device I want it to. This is not implemented in the vba object it seems. I coudl do it with lots of sendcommands, but that might be a problem, since I would not know if the command had finished. and I hate sendcommand.
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Chuck Gabriel on April 27, 2007, 01:32:23 PM
I believe AutoCAD only reads settings from the registry at load time (for the most part), so registry hacking probably won't prove to be a very effective way to change settings on a live session.
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Guest on April 27, 2007, 01:39:07 PM
I don't think there's a straight-forward way to add a device using VBA (not that I've found anyways).  You're most likely going to have to use SendCommand for some of this.    :-(
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: jjs on April 27, 2007, 02:21:58 PM
chuck, back in the vbdesign days, I thought you had some program you needed to install and you needed to change the registry and randall figured out a way to get it to update. It was either you or hatch i thought.
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Chuck Gabriel on April 27, 2007, 02:59:21 PM
chuck, back in the vbdesign days, I thought you had some program you needed to install and you needed to change the registry and randall figured out a way to get it to update. It was either you or hatch i thought.

It must've been Hatch (but wouldn't he have just answered his own question). :D
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Dnereb on May 09, 2007, 05:29:09 PM
chuck, back in the vbdesign days, I thought you had some program you needed to install and you needed to change the registry and randall figured out a way to get it to update. It was either you or hatch i thought.

Did you search Expresso Café for it?
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: jjs on May 09, 2007, 11:56:53 PM
I have the version he gave away a long time ago. But the only way I have to search it is with windows search. I could not find out how to make windows search use two words for the search such as
registry AND reload

it would always search for any of the words I type in. Do you know of any other way to search it?
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Dnereb on May 10, 2007, 03:37:23 AM
Mmmmm,

I've bought a version less then a year before cadvaults shutdown.
The html structure is quite organized. I'm currently at my day time job.
And I don't have expresso here. I will search it tonight to see if randall included something that fits your description.
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Kerry on May 10, 2007, 04:20:57 AM
I've just been scanning a couple of backup cd's.
Came across a heap of PM backups and forum Page backups.

To those who made that time a pleasure, thanks. You know who you are.
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Dnereb on May 10, 2007, 09:57:31 AM
Grmpfffffff, you had to exclude me didn't you.... ;-)
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Dnereb on May 10, 2007, 04:55:21 PM
jjs,

I've searched my version and here's no article that hints on reloading changed registry values as far as I could find. :-(
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Kerry on May 10, 2007, 08:02:56 PM
Grmpfffffff, you had to exclude me didn't you.... ;-)

Hi Berend ..

Nope !  :-)
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: jjs on May 11, 2007, 12:09:28 AM
Thanks kerry,
Now I feel stupid. I did not figure out that Dnereb was berend. But after your post I did. Now I feel really stupid.

Berend, you aren't the one that was from Norway or something that believes in global warming are you? Not that I want to start debating that issue again.

Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Dnereb on May 11, 2007, 09:18:46 AM
Smadsen was from Norway, I'm dutch.
The disscussion ended after you posted you would get back on the shark teeth issue....... :evil: still waiting :-D :-D :-D
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: jjs on May 11, 2007, 11:43:22 AM
refresh my memory about the shark teeth issue.

Dutch, that is right. You also believed in reparations for past slave trade atrocities?
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Maverick® on May 11, 2007, 11:59:50 AM
*Subconscious*   New thread, New thread, New thread
Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: Dnereb on May 11, 2007, 12:02:15 PM
jjs,

I guess this thread becomes a bit chit chatty and should be split of.
No,I do not believe in repair, I do think we have to realize our riches and partially the african poverty are a result of the slave trade and colonization.
The shark issue was about evolution, you used the fact that shark teeth stayed the same in every layer as an argument to show evolution might not be taking place. My reply was roughly How can you revoke complete skeletons as proof of change, but use just teeth to argue something stays the same.

But as said we had some nice discussions a while back... let's keep it that way.
I remember them as very intresting and with a smile.

Have a nice day and bye for now.


@Mav,

Hi strangly smiling man at the bridge.



Title: Re: Retrieving and Setting Autocad Registry Settings
Post by: jjs on May 11, 2007, 12:51:50 PM
Just trying to jog my old memory see if I remembered correctly or not. Without Stig in the discussion, it just would not be the same.

Those were some good times.