AnsweredAssumed Answered

Macro for hiding dimensions

Question asked by Joel McDevitt on Aug 20, 2018
Latest reply on Oct 9, 2018 by Matt Peneguy

Hi there,

I am needing some help developing a macro to hide the dimensions on drawings as well as pull up the print command to print to PDF.

I can get the print to pull up but I can not get the dimensions to become hidden. Here is my code :

 

Dim swApp As Object

Dim Part As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

Sub main()

Dim Toggle As Boolean

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc

Toggle = Part.Extension.SelectByID2("Annotations", "Details", 0, 0, 0, 0, 0, Nothing, 0)

Set swApp = Nothing

Set swDoc = Nothing

Part.PrintDirect

End Sub

 

I used the record function and went through Annotations, Details, and unchecked the "Reference Dimensions" check box.

 

 

Any help would be greatly appreciated.

Thank you.

Outcomes