.NET

Reply
Valued Contributor
fmarcelino
Posts: 61
Registered: ‎10-25-2005
Message 1 of 7 (67 Views)

Which version in use?

67 Views, 6 Replies
03-15-2006 04:36 AM
Hi,

I'm developing an application for AutoCAD 2006. This application will be run in ADT2006 and ABS2006. Because of that I need to know, in runtime, which product is running (AutoCAD 2006, ADT 2006, ABS 2006). How can I know this?


Thanks in advance for your attention,
Filipe Marcelino
*Tim Riley
Message 2 of 7 (67 Views)

Re: Which version in use?

03-15-2006 06:17 AM in reply to: fmarcelino
Check to see if the ADT or ABS specific arx files are loaded, if not assume
it's plain ol' 2006.

--
Regards,
Tim
http://www.theswamp.org/~tim/pyacaddotnet/


wrote in message news:5111358@discussion.autodesk.com...
Hi,

I'm developing an application for AutoCAD 2006. This application will be run
in ADT2006 and ABS2006. Because of that I need to know, in runtime, which
product is running (AutoCAD 2006, ADT 2006, ABS 2006). How can I know this?


Thanks in advance for your attention,
Filipe Marcelino
Valued Contributor
fmarcelino
Posts: 61
Registered: ‎10-25-2005
Message 3 of 7 (67 Views)

Re: Which version in use?

03-15-2006 07:02 AM in reply to: fmarcelino
Hi,

I think that's not gonna work because you can load arx files from ADT2006 in ABS2006 (actually this is already done) and versus. You can put ADT2006 and ABS2006 working like an AutoCAD 2006.

I need something to get the 'Product Name' that appers in the about box > product information. That information will tell me what version is running.

Regards,
Filipe Marcelino
*Tim Riley
Message 4 of 7 (67 Views)

Re: Which version in use?

03-15-2006 07:55 AM in reply to: fmarcelino
What's wrong with some sort of logic like this?

if ArxIsLoaded(ABS2006_Specific_ARX);
Perform_Some_ABS2006_Specific_Task
elseif ArxIsLoaded(ADT2006_Specific_ARX) and not
ArxIsLoaded(ABS2006_Specific_ARX);
Perform_Some_ADT2006_Specific_Task
else
Perform_Some_AutoCAD2006_Specific_Task

With the exception of users manually loading or unloading arx files (which
is extremely rare) it should work.

--
Regards,
Tim
http://www.theswamp.org/~tim/pyacaddotnet/


wrote in message news:5111560@discussion.autodesk.com...
Hi,

I think that's not gonna work because you can load arx files from ADT2006 in
ABS2006 (actually this is already done) and versus. You can put ADT2006 and
ABS2006 working like an AutoCAD 2006.

I need something to get the 'Product Name' that appers in the about box >
product information. That information will tell me what version is running.

Regards,
Filipe Marcelino
Valued Contributor
fmarcelino
Posts: 61
Registered: ‎10-25-2005
Message 5 of 7 (67 Views)

Re: Which version in use?

03-15-2006 07:59 AM in reply to: fmarcelino
I understand your point, mayme I didn't explain this issue very well...sorry about that.

I have to be sure if is ABS, ADT or ACAD because ?ill have to manipulate some files in the Documents And Settings area. if I don't know if is ABS, ADT or AutoCAD I can't know which folders to use.

Regards,
Filipe Marcelino
Distinguished Contributor
jbooth
Posts: 223
Registered: ‎02-17-2006
Message 6 of 7 (67 Views)

Re: Which version in use?

03-15-2006 09:31 AM in reply to: fmarcelino
Try using: System.Reflection.Assembly.GetCallingAssembly()
to get a reference to the assembly that called your application/dll/whatever.

You can then use that to reflect on the product name or version, if it works (and it should work).
*Tony Tanzillo
Message 7 of 7 (67 Views)

Re: Which version in use?

03-15-2006 11:42 AM in reply to: fmarcelino
Autodesk.AutoCAD.DatabaseServices.HostApplicationServices.Product
Autodesk.AutoCAD.DatabaseServices.HostApplicationServices.Program

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:5111612@discussion.autodesk.com...
I understand your point, mayme I didn't explain this issue very well...sorry about that.

I have to be sure if is ABS, ADT or ACAD because ?ill have to manipulate some files in the Documents And Settings area. if I don't know if is ABS, ADT or AutoCAD I can't know which folders to use.

Regards,
Filipe Marcelino
Need installation help?

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