DesignModeler
Mechanical
- May 17, 2011
- 23
Hey everyone, this may be hard to explain but I'll try my best.
I'm trying to select an edge of a part inside an assembly automatically by a macro. I've defined an "Edge Entity Name" (RMB on edge > Edge Properties > Entity Name) as "MateEdge" on the bottom of "Base-Revolve" feature of the part file. My problem is I haven't had any luck calling it with the SelectByID2 method:
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("MateEdge@Base-Revolve@NHT-SCHS-188SS-0.750-16-UNF(dot)SLDPRT", "EDGE", 0, 0, 0, True, 0, Nothing, 0)
(After stepping through - boolstatus = false)
Am I defining the name correct? Is the syntax "Entity Name@Feature Name@Part Name" ? Do I need to include the configuration name also? The SolidWorks API help well... wasn't much help.
Any help would be greatly appreciated!!
I'm trying to select an edge of a part inside an assembly automatically by a macro. I've defined an "Edge Entity Name" (RMB on edge > Edge Properties > Entity Name) as "MateEdge" on the bottom of "Base-Revolve" feature of the part file. My problem is I haven't had any luck calling it with the SelectByID2 method:
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("MateEdge@Base-Revolve@NHT-SCHS-188SS-0.750-16-UNF(dot)SLDPRT", "EDGE", 0, 0, 0, True, 0, Nothing, 0)
(After stepping through - boolstatus = false)
Am I defining the name correct? Is the syntax "Entity Name@Feature Name@Part Name" ? Do I need to include the configuration name also? The SolidWorks API help well... wasn't much help.
Any help would be greatly appreciated!!