Jump to content
Developer Wiki and Function Reference Links ×

VS in node error


RickR

Recommended Posts

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!

Link to comment

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 by DomC
Link to comment

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,

Link to comment

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:

Link to comment
  • Marionette Maven

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.

Link to comment

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.

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.

Guest
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...