.NET

.NET

Reply
Active Contributor
dancalgary
Posts: 46
Registered: ‎05-18-2007
Message 1 of 5 (227 Views)

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

227 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

Valued Mentor
gasty1001
Posts: 471
Registered: ‎04-11-2010
Message 2 of 5 (220 Views)

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
dancalgary
Posts: 46
Registered: ‎05-18-2007
Message 3 of 5 (212 Views)

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.

Valued Mentor
gasty1001
Posts: 471
Registered: ‎04-11-2010
Message 4 of 5 (204 Views)

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
dancalgary
Posts: 46
Registered: ‎05-18-2007
Message 5 of 5 (195 Views)

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"

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.