I need your help. I need to be able to change the Material of multiple Parts, from within the Assembly
(oApplication.ActiveEnvironment = "Assembly").
Right now, to update the Material on the currently opended Part, I call the following function :
setProperty(oCurrentPart, "MechanicalModeling", "Material", sProductDesc)
... wich is :
Private Sub setProperty(ByRef document, ByVal propertySet, ByVal propertyName, ByVal value)
Dim oPropertySets As SolidEdgeFramework.PropertySets
oPropertySets = document.Properties
Do I need to enter in Part Mode (oApplication.ActiveEnvironment = "Part") for each Part, then use my function (setProperty()) ?
If so, what is the command to enter in part mode from the assembly ?
In pseudo-code : currentAssembly.part("door.par").setActive ... or currentAssembly.openpart("door.par") ...
I also need to do the same thing for custom fields, which I currently update with :
setProperty(oCurrentPart, "Custom", "CustomVariable", "CustomValue")
Thanks in advance for your help !
Posted by: Jean-Sebastien Jeannotte
Post date: 3/30/2007 6:22:22 AM
you can use the OccurrenceDocument property of an Occurrence instance - SolidEdgeAssembly.AssemblyDocument.Occurrences.Ite
The OccurrenceDocument can be cast to a SolidEdgeFrameWork.SolidEdgeDocument and from there you can access the properties.
Posted by: Calum McLellan
Post date: 4/2/2007 1:31:59 AM
Can you please provide code snippet for this. i tried it but it is not working for me.
Posted by: Prasad Pawar
Post date: 6/11/2008 7:58:16 PM