How to select suboccurrence ?

 

How to select suboccurrence via API ?

When i run this code

SolidEdgeFramework.SelectSet SS=Application.ActiveSelectSet;

SS.Add(Occ); //Occ is SolidEdgeAssembly.Occurrence object

SS.Add(SubOcc); //SubOcc is SolidEdgeAssembly.Suboccurrence object

i get result:

 

Occ is selected.

SubOcc is not selected.

Thanks.

 

Posted by: Juraj Joob
Post date: 1/11/2010 9:11:43 PM

2 REPLIES

RE: How to select suboccurrence ?

Alredy I know, how to select suboccurrence. Suboccurrence is not selectable, but reference is selectable. I create reference from suboccurrence and select it with SelectSet.Add(Reference). Here is example in C#:

 

SolidEdgeAssembly.AssemblyDocument A=SubOcc.TopLevelDocument;

SolidEdgeAssembly.Occurrence O=(SolidEdgeAssembly.Occurrence)SubOcc.Parent;

SolidEdgeFramework.Reference R=(SolidEdgeFramework.Reference)A.CreateReference(O,SubOcc.ThisAsOccurrence);

 

 

Posted by: Juraj Joob
Post date: 1/12/2010 1:58:10 AM

RE: How to select suboccurrence ?

Alredy I know, how to select suboccurrence. Suboccurrence is not selectable, but reference is selectable. I create reference from suboccurrence and select it with SelectSet.Add(Reference). Here is example in C#:

 

SolidEdgeAssembly.AssemblyDocument A=SubOcc.TopLevelDocument;

SolidEdgeAssembly.Occurrence O=(SolidEdgeAssembly.Occurrence)SubOcc.Parent;

SolidEdgeFramework.Reference R=(SolidEdgeFramework.Reference)A.CreateReference(O,SubOcc.ThisAsOccurrence);

 

 

Posted by: Juraj Joob
Post date: 1/12/2010 1:58:12 AM