ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
USUlf Stockburger15/11/2019

Hi all

I have an issue, and I hope someone will point me in the right direction.


How can the API be used to hide sketches in drawings, but keep the dimensions visible?
Show/Hide Dimensions
My thought was to set every dimension of the sketch to visible. After I had checked it, I saw that they have already been set visible, but they are not visible in the drawing.

Set displayDim = swfeat.GetFirstDisplayDimension
Do While Not displayDim Is Nothing
    Debug.Print displayDim.GetNameForSelection
    Set swAnnotation = displayDim.GetAnnotation
    Debug.Print swAnnotation.Visible
    Set displayDim = swfeat.GetNextDisplayDimension(displayDim)
Loop

Any thoughts?

BiI SAP-PDM