Hello I am looking to automatically select the axis of the drilling table, to be able to hide it in automatic. When I record a macro here is what I get:
Dim Part As Object
Dim boolstatus As Boolean
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Objet de détail60@Vue de mise en plan4", "HOLETABLEAXIS", 7.13125566729208E-02, 0.16701582974387, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Objet de détail60@Vue de mise en plan4", "HOLETABLEAXIS", 7.13125566729208E-02, 0.16701582974387, 0, False, 0, Nothing, 0)
Part.HideDimension
Part.HideDimension
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Objet de détail63@Vue de mise en plan1", "HOLETABLEAXIS", 5.59130828334526E-02, 0.113017674722358, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Objet de détail63@Vue de mise en plan1", "HOLETABLEAXIS", 5.59130828334526E-02, 0.113017674722358, 0, False, 0, Nothing, 0)
Part.HideDimension
Part.HideDimension
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Objet de détail61@Vue de mise en plan3", "HOLETABLEAXIS", 2.39141761540382E-02, 0.112617688388865, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Objet de détail61@Vue de mise en plan3", "HOLETABLEAXIS", 2.39141761540382E-02, 0.112617688388865, 0, False, 0, Nothing, 0)
Part.HideDimension
Part.HideDimension
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Objet de détail58@Vue de mise en plan5", "HOLETABLEAXIS", 5.59130828334526E-02, 7.98188090424655E-02, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Objet de détail58@Vue de mise en plan5", "HOLETABLEAXIS", 5.59130828334526E-02, 7.98188090424655E-02, 0, False, 0, Nothing, 0)
Part.HideDimension
Part.HideDimension
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Objet de détail62@Vue de mise en plan2", "HOLETABLEAXIS", 0.147109966869784, 0.112617688388865, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Objet de détail62@Vue de mise en plan2", "HOLETABLEAXIS", 0.147109966869784, 0.112617688388865, 0, False, 0, Nothing, 0)
Part.HideDimension
Part.HideDimension
Part.ClearSelection2 True
so far everything is fine, except when I make a new piece because the "Detail Object" changes number, so it doesn't work anymore. How do I retrieve the detail object with the correct number of a drawing, or how do I select it directly?
forum.png