ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
DTDavid Trainor28/03/2025

Hi,

I am writing a macro having to do with the sheet numbers, and I need to retrieve the value of the current sheet number. It is stored in Solidworks as $PRP:"SW-Current Sheet", but I am having trouble calling this value in the macro. This value is used for the text field "Sheet 1 of 20", with 1 being the current sheet value.

My code only delivers an empty string

Sub ShowCurrentSheetNumber()
' Declare