In the SE SDK has the "AssemblyProperties" interface.
I want to get something through this interface, but the results is null.
I want to add something to model through AddProperty(String) and AddPropertyItem(String, PropertyTypeConstants, Object) method, but I can not find the content I added in models.
In models, Where is AssemblyProperties????
my program:
SolidEdgeFramework.Application SEApp = null;
SolidEdgeFramework.SolidEdgeDocument SEDoc = null;
SolidEdgeAssembly.AssemblyDocument ASMDoc = null;
SolidEdgeAssembly.AssemblyProperties asm_props = null;
SolidEdgeAssembly.AssemblyProperty asm_prop = null;
SEApp = Marshal.GetActiveObject("SolidEdge.Application") as SolidEdgeFramework.Application;
SEDoc = SEApp.ActiveDocument as SolidEdgeFramework.SolidEdgeDocument;
if (SEDoc.Type == SolidEdgeFramework.DocumentTypeConstants.igAssemblyDocument)
{
ASMDoc = SEDoc as SolidEdgeAssembly.AssemblyDocument;
asm_props = ASMDoc.AssemblyProperties;
******************get ************************************but is null
for (int i = 1; i <= asm_props.Count; i++)
{
asm_prop = asm_props.Item(i);
MessageBox.Show(asm_prop.Name);
}
**********************************************************
*****************add************************************but I can not find in model
asm_props.AddProperty("hello asm");
asm_prop = asm_props.Item(1);
asm_prop.AddPropertyItem("111", SolidEdgePart.PropertyTypeConstants.sePropertyTypeString,(object)("hell"));
}
Please help!
Thanks!