Kurtiswilk Posted April 12, 2022 Share Posted April 12, 2022 Hey All, I seem to be missing something, Probably over thinking it. I have a popup 0- left 1- right 2- top 3- bottom 4- none I'm looking for a way to have an "IF" statement with the popup being the test. If the "popup" is "none" its true, any other value would return a false. Ultimate goal is to use this to remove an item when not required. I'm sure its not explained very well. Thanks Kurtis Quote Link to comment
Pat Stanford Posted April 12, 2022 Share Posted April 12, 2022 I don't think there is a way to use the default Popup node to handle a dynamic number of items. If you want that you will have to create your own popup node and then probably pass it a list of display values and output values for each display. It is often better to explain what you are trying to accomplish rather then your implementation idea. Once we know what the goal and input conditions are we can better offer different implementation ideas. Quote Link to comment
Kurtiswilk Posted April 13, 2022 Author Share Posted April 13, 2022 (edited) I'll use a color picker as an example. I want to have a popup be able to chose a line color, and then say if red is selected turn off part or hide a section of the marionette. Just missing the step in between. I've attached the bit used to pick the color, works like a charm via popup under object attributes Edited April 13, 2022 by Kurtiswilk Quote Link to comment
Kurtiswilk Posted April 13, 2022 Author Share Posted April 13, 2022 So I did indeed figure out how to accomplish the if statement. The new problem, How to sett a fill of a rectangle to None . I was drastically over thinking the if problem. Using a "if in string" with the main string being the popup and the sub string and integer matching the selection you want in the attached example, if you select the color grey it'll be overridden with yellow otherwise will show the selected Quote Link to comment
twk Posted April 13, 2022 Share Posted April 13, 2022 Set Fill Pattern to 0 https://developer.vectorworks.net/index.php/VS:SetFPat Quote Link to comment
Kurtiswilk Posted April 17, 2022 Author Share Posted April 17, 2022 On 4/13/2022 at 3:17 PM, twk said: Set Fill Pattern to 0 https://developer.vectorworks.net/index.php/VS:SetFPat That looks like exactly what i need. But I can't seem to figure out how to plug that into marionette? Quote Link to comment
DomC Posted April 19, 2022 Share Posted April 19, 2022 Hi It should be possible, to use the "Attributes"-Node to set fill pattern to 0. Connect it after your object and set it to Empty Fill. After That attach your colors. The Problem could be that the "Attributes" node replace also the line weight and line style. If that is a problem you can use the "function"-Node. And just paste vs.SetFPat(x, 0) in the input field. 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.