AnsweredAssumed Answered

Get Visibility State of Sketch

Question asked by Lukas Bernhardt on Jul 9, 2017
Latest reply on Aug 5, 2017 by Lukas Bernhardt



ist there an API Method to get the Information whether a selected Sketch is visible oder hidden ?! I want to create a

macro which changes the visibility of a specific sketch every time i run the macro. The code above just show the sketch. Bute i need a information

if the macro should blank or unblank.


Thanks for Help !




Sub main()


Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set swModelDocExt = swModel.Extension


'Hole die Dokumenteigenschaft v_Teilenummer

Set swCustProp = swModelDocExt.CustomPropertyManager("")

bool = swCustProp.Get4("v_teilenummer", False, val, valout)



Name = "3D-Rahmen_" + val


Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc


boolstatus = Part.Extension.SelectByID2(Name, "SKETCH", 0, 0, 0, False, 0, Nothing, selectval)



End Sub