.NET

.NET

Reply
Active Contributor
46 Posts
1 Kudo
Registered: ‎05-18-2007
Post 1 of 5

How do I get if I run autocad vanilla or autocad civil3D

237 Views, 4 Replies
05-14-2013 10:37 AM

I created 2 dll's

One for autocad  the other one for civil

I created another dll that loads using

Reflection.Assembly.LoadFrom("file")

the dlls into autocad at startup

I want to be able to detect if the productID is civil to be able to load the civil3d dll.

Can somebody tell me how to detect this?

Thanks

Distinguished Mentor
582 Posts
91 Kudos
Registered: ‎04-11-2010
Post 2 of 5

Re: How do I get if I run autocad vanilla or autocad civil3D

05-14-2013 11:17 AM in reply to: dancalgary

Hi,

 

Check the "PRODUCT" system variable.

 

Gaston Nunez

Active Contributor
46 Posts
1 Kudo
Registered: ‎05-18-2007
Post 3 of 5

Re: How do I get if I run autocad vanilla or autocad civil3D

05-14-2013 11:56 AM in reply to: gasty1001

product variable for both autocad and civil3d has the same content:

PRODUCT = "AutoCAD" (read only)

I need something to be able to see if is civil3d or not.

Distinguished Mentor
582 Posts
91 Kudos
Registered: ‎04-11-2010
Post 4 of 5

Re: How do I get if I run autocad vanilla or autocad civil3D

05-14-2013 12:47 PM in reply to: dancalgary

Hi,

 

Oops, It seems you have to extract that info from the registry, this link may hel you: registry Product Info

 

Gaston Nunez

Active Contributor
46 Posts
1 Kudo
Registered: ‎05-18-2007
Post 5 of 5

Re: How do I get if I run autocad vanilla or autocad civil3D

05-14-2013 03:00 PM in reply to: gasty1001

thanks this helped

I used

Autodesk.AutoCAD.Runtime.SystemObjects.DynamicLinker.ProductKey = "Software\Autodesk\AutoCAD\R18.2\ACAD-a000:409"

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!