[API] How to select a face of a sub-part in an assembly?
[API] How to select a face of a sub-part in an assembly?
(OP)
Hello,
I have an assembly with one sub-component (which is a part).
Using IModelDocExtension.SelectByID2(), I want to select a face of
this sub-part, in the context of the assembly.
I only know the name of the face (for instance "E115")
I tried something like the following but this does not work:
modelDocExtenion.SelectByID2
( "E115@part_body@assembly_component-1@assembly", "FACE", 0, 0, 0,
false, 1, null, swSelectOptionDefault )
I can select the part body, but not one of its faces:
modelDocExtenion.SelectByID2
( "part_body@assembly_component-1@assembly", "SOLIDBODY", 0, 0, 0,
false, 1, null, swSelectOptionDefault )
I also tried to select the face in the context of the part document,
but, of course, in the context of the assembly, the selection list is
empty...
Thanks in advance.
Olivier.
I have an assembly with one sub-component (which is a part).
Using IModelDocExtension.SelectByID2(), I want to select a face of
this sub-part, in the context of the assembly.
I only know the name of the face (for instance "E115")
I tried something like the following but this does not work:
modelDocExtenion.SelectByID2
( "E115@part_body@assembly_component-1@assembly", "FACE", 0, 0, 0,
false, 1, null, swSelectOptionDefault )
I can select the part body, but not one of its faces:
modelDocExtenion.SelectByID2
( "part_body@assembly_component-1@assembly", "SOLIDBODY", 0, 0, 0,
false, 1, null, swSelectOptionDefault )
I also tried to select the face in the context of the part document,
but, of course, in the context of the assembly, the selection list is
empty...
Thanks in advance.
Olivier.





