Determine version
Using :
AcadApplication m_BricscadApp = (
AcadApplication)Marshal.GetActiveObject("BricscadApp.AcadApplication");
in C# will work for Bricscad V8 as well as Bricscad V9.
Once I have a reference, how can I see from m_BricscadApp which version I'm communicating with?
Both m_BricscadApp.name and m_BricscadApp.version give the same results for V8 and V9.
T.i.a,
Arno van Eeuwen
0
Comments
-
you might try getting the _vernum system variable
[CommandMethod("getver")]
public static void getver()
{
try
{
AcadApplication app = Application.AcadApplication as AcadApplication;
if (app == null)
throw new Exception("Could Not Get Application");
AcadDocument doc = app.ActiveDocument;
string ver = doc.GetVariable("_VERNUM") as string;
doc.Utility.Prompt(ver);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
0 -
Thank you Daniel.
That's what I was looking for.
Cheers,
Arno
0
This discussion has been closed.