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

Calculations node to stack panels

Recommended Posts

 

Hi,

I need a node that places the panels above each other. Attached a small network to explain what I want to achieve. Is there a possibility to solve this with a single node? I don't want to slow down the speed of my network.

 

Example:

I have a list like this:

[0] =0

[1]=500

[2]=400

[3]=300

 

And i want the result of the list look like this:

[0]=0

[1]=0 + 500

[2]=0+500+400

[3]=0+500+400+300

 

All hints are welcome.

Regards Nico

 

 

 

NodeToStackPanels.vwx

Share this post


Link to post

I also used such a node in several networks (I called "Values to Saldo" ). Seems to be something often used. Maybe a candidate for standard node content? So we would use all the same node with the same code and the same content ... :-)

 

 

 

  • Like 1

Share this post


Link to post

 

Thank you for your quick response. It works perfectly!

I test the same network with connected records. See attached.

Now I have the problem if no rectangle is made, I get an error. But the network remains working well. Is there a way to not create 7 rectangles first and then delete what I do not need?

I work on a cabinet which automatically calculates the width and height of the front. However, I want the ability to customize the layout like the test network. Removing the door from the original cabinet is not a problem because it is always calculated and, if necessary, removed at the end of the script. My goal is, if the test network input is empty, no panels will be calculated + the original door will be retained.

The worksheet i am using to get te panel-data also attached.

 

My non-working approach:

Changing the handle from the set record node. from (0) to (None)

#inObj = Marionette.PortIn( vs.Handle(0), 'obj' ) #To # inObj = Marionette.PortIn( vs.Handle(None), 'obj' )

 

Thx for any advice.

Regards Nico

 

NodeToStackPanels.vwx

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.

×