Jump to content

Wall type schedule to display component "Function"

Recommended Posts



Is there a function to return a wall style component name using its "Function" attribute in a worksheet?




I'd like to make a schedule similar to the image below. I can get close using a database header of =COMPONENTNAME(1), =COMPONENTNAME(2), etc... but it falls apart if I don't have exactly 3 components in a wall type.



Thanks for suggestions!


Share this post

Link to post

The following worksheet script will return the component index of the first component in a wall that has the Function specified by the passed integer. Put this in a database and it will give you the Load-Bearing component of each wall. Use that returned value in a =ComponentName() function to get the name. You may want to put the Index into a column that can be hidden.


This script can be run in any file that it exists in. If you want to get fancy, you can slightly change the way the script is called and store it as a text file accessible from any VW file.


Copy and paste everything in the code block below into a new black script file (from the Resource Browser). Make sure the script is named ComponentIndex. Use the function =RunScript('ComponentIndex',1) to get the Load-Bearing component index. If you put this in database cell C3, then set C4 to =ComponentName(C3) to get the name of the component.


Ask again if you have more questions.


Procedure ComponentIndex;

{July 11, 2019}
{© 2019 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{This is intended to be run as a worksheet script and to}
{return the first component number that has the function}
{indicated by the integer values below}
{That retuned component number can then be used to lookup}
{the ComponentName.}

{Run using a WS call of =RunScript(ComponentIndex,1) to return}
{the component number of the Load-Bearing component.}

{Pass the values below to the WSScript to get the componet with that function
0 - Other 
1 - Load-Bearing 
2 - Insulation 
3 - Inner Finish 
4 - Outer Finish 
5 - Air Gap

Var	WallH:Handle;
	For N2:= 1 to NumComponents do
			If (ThisFunction=ComponentFunction) then WSScript_SetResInt(N2);



Share this post

Link to post

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.

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.


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.

  • Create New...