.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Which version in use?

6 REPLIES 6
Reply
Message 1 of 7
fmarcelino
319 Views, 6 Replies

Which version in use?

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
6 REPLIES 6
Message 2 of 7
Anonymous
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
Message 3 of 7
fmarcelino
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
Message 4 of 7
Anonymous
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
Message 5 of 7
fmarcelino
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
Message 6 of 7
jbooth
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).
Message 7 of 7
Anonymous
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost