Jump to content
Developer Wiki and Function Reference Links ×

Node - refresh Worksheet?


Recommended Posts

This very simple node (I think this is the first time I have ever patched together a new node) seems to recalc a worksheet based on being passed a handle to the WSImage.


In the attached file there is a very short WSScript that returns the date and time. When you run the Marionette, the seconds seem to update. Is this close to what you want?


class Params(metaclass = Marionette.OrderedClass):
	this = Marionette.Node( "RecalcWorksheet" ) 
	this.SetDescription( "Recalculates the Worksheet based on the selected image in the drawing" )

	hWorksheetImage = Marionette.PortIn( vs.Handle(0) , 'hWSImage' )
	hWorksheetImage.SetDescription('Handle to the worksheet Image')
def RunNode(self):
	worksheetImage = self.Params.hWorksheetImage.value
	if worksheetImage != vs.Handle(0):
		worksheet = vs.GetWSFromImage(worksheetImage)



RecalcWS Demo.vwx

  • Love 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...