unearthed Posted September 10, 2023 Share Posted September 10, 2023 (edited) When I'm doing plant orders I like to colour cells once I know an order is complete for that particular plant. I do everything in worksheets as have never found the plant database thing useful to how I work. Doing this manually is tedious: 1 select cell 2 right click 3 format 4 select format tab 5 dropdown 6 solid 7 Select colour 8 Ok I do not yet work with Marionette but have seen a few work nodes that mention colouring worksheet cells, but haven't found anything like this. Edited September 10, 2023 by unearthed spell error in subj Quote Link to comment
Pat Stanford Posted September 10, 2023 Share Posted September 10, 2023 It does not appear that any of the VW2023 default Marionette nodes provide for Worksheet Cell Formatting. But there are Vectorscript calls to do this, so it should be relatively easy to modify the SetCellFormula node to do what you want. The line of the script that sets the formula at the bottom of the SetCellFormula node is: if worksheet != vs.Handle(0): formula = vs.SetWSCellFormulaN(worksheet, top, left, bottom, right, formula) If you change the SetWSCellFormulaN to PROCEDURE SetWSCellFill ( worksheet:HANDLE; topRow:INTEGER; leftColumn:INTEGER; bottomRow:INTEGER; rightColumn:INTEGER; style:INTEGER; bgcolor:LONGINT; fgcolor:LONGINT; fillpattern:INTEGER ) ; You will only need to remove the formula input and add the Style, bicolor, fgcolor, and fill pattern values. There is also another trick that you have to do at the top of the node to make it changeable that I can never remember. @sbarrett@Marissa Farrell can you help here? 2 Quote Link to comment
Peter Vandewalle Posted September 10, 2023 Share Posted September 10, 2023 There is also another trick that you have to do at the top of the node to make it changeable that I can never remember. @sbarrett@Marissa Farrell can you help here? To be able to change a marionette node, you need to remove the comment lines at the top of the script. Otherwise you can't change the modified script. 1 Quote Link to comment
Pat Stanford Posted September 10, 2023 Share Posted September 10, 2023 The comment lines are the lines at the top that start with # You will need to add additional input ports (unless you want to hard code the values) both in the ClassParams and RunNode #Input section. You can find the definition of the Vectorscript/Python function at: https://developer.vectorworks.net/index.php/VS:Function_Reference 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.