AnsweredAssumed Answered

Modifying Document Toggle Options

Question asked by Luke Frost on Sep 18, 2018
Latest reply on Sep 19, 2018 by Deepak Gupta

Hi All,

 

I am trying to create a simple macro that toggles the "Rename cut list folders with Description property value" in the document options of a part.

 

I have found the following post, which helped me get the code (see below) working.

 

Dim swApp As Object

Dim Part As Object

Dim boolstatus As Boolean

Dim instance As IModelDocExtension

 

Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc

Set instance = Part.Extension

boolstatus = instance.SetUserPreferenceToggle(swUserPreferenceToggle_e.swWeldmentRenameCutlistDescriptionPropertyValue, 0, True)

End Sub

 

The option does seem to be toggling on however the actual cutting list doesn't seem to be changing at all where as if i was to do it manually outside of the macro then it does change.  Am i missing something that i need to add in order to get this sorted.

 

Thanks in advanced

 

Luke

Outcomes