Jump to content
Developer Wiki and Function Reference Links Read more... ×
VvierA

Attach record

Recommended Posts

Hello everybody,

with the kind help of Marissa and the forum I managed to create a working network.

 

There is a pop-up list at the beginning to choose between some options, for example 'timber, concrete, glass'.

Now I'd like to attach the name of the chosen option to a record field, for example create a record format 'custom object' with the field name 'material' and attach the chosen option 'timber'.

 

I've found some nodes (i.e. create field) that seem to be helpful but I didn't find an example on how to use them the right way...

And I was also wondering how to get the name of the chosen option of the pop-up list. I don't know how to do this, because the result of the node popup is just a integer number that represents just the position of the option in the list.

 

Does anybody know of some examples or can anybody help me with some hints?

 

Thank you

VvierA

Share this post


Link to post

Here's a quick example - I included a custom Popup node (I'll look into modifying the one we have in our Default Content for easier use)

 

You may not need the Pass node as long as every node in your script is wired together in some way, I only used it because I needed to make sure that all of the nodes were connected to the network.

 

Note: I currently have this update the record attached to the Marionette Object by using the PIO Handle (Parent PIO) node. If you want to assign it to an item inside of your Marionette Object (or if you are just using it in a standalone script), you can just wire the object you want to assign the record to there.

 

SimplePopupStringExample_withRecords_MFarrell.vwx

Share this post


Link to post

Hi Marissa, thank you again, very helpful and interesting...

 

do I understand it correctly your new choices node gives to results: i is the integer representing the number of the option in the list and s results the string?

So I can still use 'i' for a comparison in a valve node and 's' to write it in my record field...

 

Share this post


Link to post

Works great, thank you.

But there's one thing, I'm not sure about: what's the 'pass node' for?

It's getting the handle to the parent PIO but it doesn't do anything, so I'm not sure, for what it is needed...?

Share this post


Link to post

In many cases you won't need it, but since I needed to make sure the rectangle node was connected to the rest of the network in some way, I had to include it.

Share this post


Link to post

Ah I see... thanks.

And hopefully my last question for some time... if I'd like to write several record fields at once I will need a 'set record field' node for each entry.

But do I also need an 'attach existing record' node and 'parent PIO' for each entry or is it possible to connect several 'set record field' nodes to the same one 'attach existing record' node?

Share this post


Link to post

You don't need to add any more Attach Existing Record or Parent PIO nodes, you should be fine to just use the multiple Set Record Field nodes.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×