Thank you MickD, I will look into that.
Apparently its a message within the .net code i copied from http://through-the-interface.typepad.com/ and not an internal code exception error @n.yuan
Thank you for the info Interop.ACSMCOMPONENTS21.dl
So far i still haven't found what's causing that error, I'm in the process of re-writing the code in pure .net c# code. What i have now is a mix of lisp and .net. Not a very efficient way of doing it i know
Keep you guys posted.
While i'm at it, might as well ask a question
How do i pass an "argument" to a WPF dialog?
...
// Get SheetSet
AcSmSheetSetMgr ssmgr
= new AcSmSheetSetMgr
(); IAcSmDatabase db = ssmgr.OpenDatabase(ssFilePath, false);
IAcSmSheetSet ss = db.GetSheetSet();
List<string> propNames = GetSheetSetCustomProperties(ss);
string Tolisp = db.GetSheetSet().GetObjectId().GetHandle();
propNames.Add("ObjectID | " + Tolisp);
var myArray = propNames.ToArray();
// WPF
System.Windows.Window win
= new WPF_Dialog1
(); // <--- Here Autodesk.AutoCAD.ApplicationServices.Application.ShowModalWindow(win);
Is it the same method as a sub-function in lisp?
myArray as a string array. ?
WPF_Dialog1(myArray)
or is propNames already an Array?
EDIT: BTW i'm using GetSheetSetCustomProperties(ss) from throughtheinterface by Kean Walmsley ( I think, I'm not sure now, gone through a lot of sites for SSM ) private static List<string> GetSheetSetCustomProperties(IAcSmSheetSet sheetSet)
{
List
<string> propNames
= new List
<string>(); IAcSmEnumProperty propEnum = sheetSet.GetCustomPropertyBag().GetPropertyEnumerator();
// Allocating space for variable name
string propName;
AcSmCustomPropertyValue propVal;
do
{
propEnum.Next(out propName, out propVal);
if (!String.IsNullOrEmpty(propName)) propNames.Add(propName + " | " + propVal.GetValue());
} while (!String.IsNullOrEmpty(propName));
return propNames;
}
I originally use the above snippet to collect the data then write to a text file from the result.