RickR Posted February 26, 2016 Share Posted February 26, 2016 SoftGoods objects are complex. I'm sorry if I'm jumping into something beyond my coding skills. Perhaps this is the wrong approach, but it seems to allow pull downs in the OIP of a node. I was planning on grafting this onto my node to create a SG object. I'd like to create a general purpose node that others can use and that can be a template for making more PIO nodes. So I've concocted a rather long list of input fields to set via a node. Most of this is just repetition of existing code with the exact field names thrown in. However, I'm getting VS errors that are beyond me. Traceback (most recent call last): File "", line 4, in File "", line 18, in Params NameError: name 'Start' is not defined The code is attached. Line 4 is just an input. There are nearly identical lines above line 18. I can't see any typos or other issues. Perhaps this is from inside a Marionette module? I'm up for suggestions! Quote Link to comment
DomC Posted February 26, 2016 Share Posted February 26, 2016 (edited) Hi Rick I think, you have many quotes in quotes. I think you have to escape them. Or maybe use international units ? And this line: OpenFrom = Marionette.OIPControl( 'OpenFrom', Marionette.WidgetType.Popup, Start, ['None', 'Start', 'Center', 'End']) you have Start as a variable or a module name. You have to quote that like 'Start' Dom Edited February 26, 2016 by DomC Quote Link to comment
RickR Posted February 27, 2016 Author Share Posted February 27, 2016 Ah, that and a few others. I'm sorry if I'm asking basic questions. The foot and inch marks are in alternate quote marks. I was thinking would do the trick, but probably not. Been decades since I did anything like this. Can you give me the escape sequence? I went looking and found several answers, some contradictory, but all for VS not Python. Are you talking about % \ or double characters '' or ""? Thank you, Quote Link to comment
DomC Posted February 27, 2016 Share Posted February 27, 2016 Hm, It seems, that quotes can't be escaped here in this specific situation. As far as I tested, the behavior is like this: python: escaping of quotes and other controll characters, is with \ vectorscript functions: In a Vectorscript function example vs.AlrtDialog("''''''''Test''''''") or vs.AlrtDialog('"""""""Test"""""""') double and single quote do the trick as well. Also escaping works here. In a Marionette Node, we can use special characters not everywhere. I do not know where exactly not. But there is a solution for that specific problem: https://en.wikipedia.org/wiki/International_System_of_Units :eek: Quote Link to comment
RickR Posted February 27, 2016 Author Share Posted February 27, 2016 OK then, I'm not as clueless as I thought. FYI; I still see conversion errors between units. In fact I think I'm seeing them more in v2016! Thank you for trying! Quote Link to comment
Marionette Maven Marissa Farrell Posted February 29, 2016 Marionette Maven Share Posted February 29, 2016 RickR, Where are you seeing conversion issues most frequently? Are you seeing them using your soft goods example? Also, for your default values, how necessary is it to have units adhered to them? In the OIP, these values will all adhere to document units anyhow, so they should behave the same as if you were to use any other object in the OIP. Just curious. Quote Link to comment
RickR Posted March 1, 2016 Author Share Posted March 1, 2016 Marissa, I try to think about the rounding errors as little as possible. It hasn't been in the SG, but I can't recall where else. Perhaps it's entering values in the floating tool bar, (imperial converted to SI & back?) I'll try to notice more and get back to you. I figure half the value of what I'm trying is so others can use it. Therefore document units are unknown. But it seems now that double quoting is doing the job. I had a bunch of other formatting issues as well. Here is my work to date. (2 design layers for different issues) I noticed that there is an IFC node that is a pull-down entry node. If the list could be a text input it might be handy for many things. 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.