m.graf Posted March 14, 2022 Share Posted March 14, 2022 Hi Everyone, does anyone have a Marionette node to update Worksheets (visible on Layer's) vs.ResetObject(x) / vs.RecalculateWS(x) don't work greatings M.Graf Quote Link to comment
Jesse Cogswell Posted March 14, 2022 Share Posted March 14, 2022 Before you give up, make sure your node has a vs.RedrawAll() call in addition to the regular recalculate and reset calls. If the worksheet is currently visible on a design layer or active sheet layer, it won't do a redraw after the source worksheet is updated. 2 Quote Link to comment
m.graf Posted March 15, 2022 Author Share Posted March 15, 2022 this Vectorworks Script work's - but I can't get it to work with Marionette - Phyton Greatings M. Graf Quote Link to comment
Pat Stanford Posted March 15, 2022 Share Posted March 15, 2022 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? @Marionette.NodeDefinition 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): #inputs worksheetImage = self.Params.hWorksheetImage.value #script if worksheetImage != vs.Handle(0): worksheet = vs.GetWSFromImage(worksheetImage) vs.RecalculateWS(worksheet) #outputs RecalcWS Demo.vwx 1 Quote Link to comment
m.graf Posted March 15, 2022 Author Share Posted March 15, 2022 Super! Thanks very much! greatings M. Graf Quote Link to comment
Recommended Posts
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.