Syntax for RegistryTools
Syntax for RegistryTools
(OP)
Howdy,
I hope I'm asking this question correctly
.
I recently got my hands on a copy of SW2009 (liking it so far :D ). So I wanted to try to update my method for accessing the Windows Registry. I can tell that I need to add the reference to the VBATools library which contains the RegistryTools class, but, can't seem to figure out "exactly" the syntax for using the listed functions (CreateSectionKey, ReadKey, WriteKey, etc.).
I've attached an example of the existing method that requires the module written by Kenneth Ives. It still seems to work fine, but, I wanted to take advantage of the SW2009 API update.
Can anyone update my example or direct me to a "simple" example that demonstrates the syntax for use in SW2009?
Thanks
I hope I'm asking this question correctly
I recently got my hands on a copy of SW2009 (liking it so far :D ). So I wanted to try to update my method for accessing the Windows Registry. I can tell that I need to add the reference to the VBATools library which contains the RegistryTools class, but, can't seem to figure out "exactly" the syntax for using the listed functions (CreateSectionKey, ReadKey, WriteKey, etc.).
I've attached an example of the existing method that requires the module written by Kenneth Ives. It still seems to work fine, but, I wanted to take advantage of the SW2009 API update.
Can anyone update my example or direct me to a "simple" example that demonstrates the syntax for use in SW2009?
Thanks
Tobin Sparks
www.nov.com






RE: Syntax for RegistryTools
-handleman, CSWP (The new, easy test)
RE: Syntax for RegistryTools
Thanks for responding to my post. I'm starting to gain confidence that this can be figured out
Attached are a couple of screen shots that I hope will better explain where I found the VBATools library and CreateSectionKey function I would like to use.
My VB2005 book explains the VB.net method as:
My.Computer.Registry.CurrentUser.CreateSubKey("Software\CompanyName\MacroName")
I understand this method doesn't work with the SolidWorks API.
The current method (using the module written by Kenneth Ives) is:
regCreate_A_Key HKEY_CURRENT_USER, "Software\CompanyName\MacroName"
This module method seems to work fine in SW2009, but, I was looking for the syntax for the CreateSectionKey function provided in the VBATools library in SW2009.
I hope I'm not making this worse
Tobin Sparks
www.nov.com
RE: Syntax for RegistryTools
Unless I'm mistaken, you can't use .net stuff in .swp type file. If you go to the VSTA type .net macros new in 2009 then you can use .net stuff.
-handleman, CSWP (The new, easy test)
RE: Syntax for RegistryTools
OH! After I sent the last post I was asking myself - why would you say you didn't have VBATools - then it struck me - all those libraries are found anywhere on my computer, not just in SolidWorks directories, even though I had to get to them thru the SolidWorks API. DA!
So - I'm not at all familiar with VSTA.net. I had to look it up. <Visual Studio Tools for Applications (VSTA) allows you to create macros and embed a Visual studio based IDE into your application using C# or VB.> My companies internet blocker prevented further access so I'll have to look into it at home.
I get the feeling that by creating a VSTA.net type macro others will not be able to view the code.
Is that correct?
Thanks for your response - always valuable and informative
Tobin Sparks
www.nov.com
RE: Syntax for RegistryTools
-handleman, CSWP (The new, easy test)
RE: Syntax for RegistryTools
RE: Syntax for RegistryTools
Thanks
Tobin Sparks
www.nov.com