Hi all, I am trying to adapt a node I found on the forum which changes sheet layer sheet titles. I wish to adapt it to change sheet layer sheet numbers. What I have tried is to change 'object property index' from 159=Sheet Title to 158 which I hope is for the sheet number. I also changed the parameter from self.Params.sTitle.Value to self.Params.sNum.Value. Which I hope is the parameter name for the sheet layer sheet number. I think both are incorrect. I have uploaded a test file where I am trying to create this node. Below is the code I am trying to hack together to create the custom node for changing sheet layer sheet number.
#Created by MFarrell 02/02/18
#modified to sheet number sjm 12.08.2022
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( 'Change Sheet Number' )
this.SetDescription( 'Changes the Description value of a Sheet Layer' )
#Input Ports
obj = Marionette.PortIn( vs.Handle( 0 ), 'hLayer' )
obj.SetDescription( "The input object" )
sNum = Marionette.PortIn( '' )
sNum.SetDescription( "Number of the sheet" )
#OIP Controls
#Output Ports
value = Marionette.PortOut('hLayer')
value.SetDescription( "Handle to the layer" )
#BEHAVIOR
def RunNode(self):
#inputs
obj = self.Params.obj.value
index = 158
sNum = self.Params.sNumber.value
#script
value = vs.SetObjectVariableString(obj, index, sNum)
#outputs
self.Params.value.value = obj
Batch Change Sheet Numbers_#2.vwx