Jump to content
  • 7

Request for a “ComponentMaterialProperty(propertyName)" worksheet function 


Tom W.

Question

Recommended Posts

  • 0

@Tom W. & @Nikolay Zhelyazkov

 

Here is a bit of a tougher question -- is it possible to call out the sub materials of a composite material in a tag - and / or their respective properties?

i.e. If you have 2 materials in a composite material - Metal studs and Batt insulation - and you want them to be call out like :

 

Composite material name

Sub material 1 - Submaterial Tag / Description / percentage of composite material

Sub material 2 - Submaterial Tag / Description / percentage of composite material

etc...

 

Again, thank you in advance!!

Edited by Samuel Derenboim
Link to comment
  • 0
16 minutes ago, Samuel Derenboim said:

@Tom W. & @Nikolay Zhelyazkov

 

Here is a bit of a tougher question -- is it possible to call out the sub materials of a composite material in a tag - and / or their respective properties?

i.e. If you have 2 materials in a composite material - Metal studs and Batt insulation - and you want them to be call out like :

 

Composite material name

Sub material 1 - Submaterial Tag / Description / percentage of composite material

Sub material 2 - Submaterial Tag / Description / percentage of composite material

etc...

 

Again, thank you in advance!!

 

I think the answer is no but hopefully @Nikolay Zhelyazkov will correct me! I'm pretty sure that all you can return using Data Tag on Compound Materials is the 'Mark' + 'Description' fields for the Compound Material itself. I don't think you can get at anything else. This is Materials used in Components.

 

You can do more in a worksheet of course.

 

 

Link to comment
  • 0
1 hour ago, Samuel Derenboim said:

Thank you.

Is this possible on a worksheet instead then? (i know worksheet functions can be called out in tags as well so long you have the WS_ in front of the function. Maybe I can Tinker around with it if i know how to callout the subcomponent properties in a worksheet

 

I think we need @Nikolay Zhelyazkov's help on this...! There is a MaterialPercent() function but I have never used it before + testing it now can't get it to work on a Slab for example, only an Extrude... I think this is because it's not a component-specific function like all the ComponentMaterial ones.

 

What I do is report on the quantities of the Simple Materials inside a component's Compound Material using MaterialSurfaceArea() MaterialVolume(). But this is the total quantity in the model (less anything in particular I need/want to exclude). I am less interested in the percentage because a reinforced concrete slab for example will be set up to return 100% of the surface area (for the mesh) + 100% of the volume (for the concrete) but I don't need to report these percentages, they perform an under the hood function.

 

As regards returning this data from a component:

1 hour ago, Samuel Derenboim said:

Sub material 1 - Submaterial Tag / Description / percentage of composite material

I basically include this info in the Description field for a Compound Material: not the specific data you list because I don't want the Material name to appear or the percentage, but info about what the compound material is e.g. 'RC28/35 concrete with A393 steel reinforcement mesh in bottom (75mm cover)'. I know this isn't what you want though! You want to pull out data that is already there, not reenter it in a different field...

Link to comment
  • 0
4 minutes ago, Tom W. said:

 

I think we need @Nikolay Zhelyazkov's help on this...! There is a MaterialPercent() function but I have never used it before + testing it now can't get it to work on a Slab for example, only an Extrude... I think this is because it's not a component-specific function like all the ComponentMaterial ones.

 

What I do is report on the quantities of the Simple Materials inside a component's Compound Material using MaterialSurfaceArea() MaterialVolume(). But this is the total quantity in the model (less anything in particular I need/want to exclude). I am less interested in the percentage because a reinforced concrete slab for example will be set up to return 100% of the surface area (for the mesh) + 100% of the volume (for the concrete) but I don't need to report these percentages, they perform an under the hood function.

 

As regards returning this data from a component:

I basically include this info in the Description field for a Compound Material: not the specific data you list because I don't want the Material name to appear or the percentage, but info about what the compound material is e.g. 'RC28/35 concrete with A393 steel reinforcement mesh in bottom (75mm cover)'. I know this isn't what you want though! You want to pull out data that is already there, not reenter it in a different field...

 

@Tom W. You're right on the money. Essentially I am using the properties to create a parametric 'description' of materials, walls, slabs, etc... as well as volumetric, area and weight properties. For example - would it be possible to calculate the weight of a compound object? Theoretically you have the density of the compound objects and their respective thicknesses. When multiplied by the percentage of material the part makes up - i believe you can calculate the weight that way.

Weight would be super terrific for load calculations for engineers. This in turn would help them design better and more effective structural systems that are more precise rather than the conservative values they may place per object. This can in turn save on steel.

 

I know the differences would be negligible, but still, would be an effective decision making tool. (this is just one use case of extracting sub component materials)

 

@Nikolay Zhelyazkov help please ! 😂

Link to comment
  • 0

@Luka Stefanovic is someone else who might be able to help you on this...

 

I tend to take either the surface area or volume of a Material then calculate the weight from that in a separate cell in the worksheet, based on the product/material in question (i.e. from manufacturer's data sheet). So again the Material % is only there to ensure the correct m2/m3 is being sent to that cell in the first place. But this is the total weight of that material/product in the model rather than pointing at a particular object + saying it weighs 'this much'... However you could easily isolate particular things in the model by class like floors or roofs or a wall + report on their weight this way...? just not point at them with a Data Tag + do it...

 

Interesting stuff - keep us posted!

  • Like 1
Link to comment
  • 0

So i have been browsing the VW function reference and noticed some interesting things

https://developer.vectorworks.net/index.php/VS:AddSubMtrlToMtrl

https://developer.vectorworks.net/index.php/VS:UpdateSubMtrlInMtrl

 

there is a function to add, update and remove submaterials in a material. No functions (at least that i see) have the ability to get the name or the properties of the submaterials. What is, however, interesting is that these vectorscript functions have a handle called subMtrlName. I've used it as a function of objectdata, and have some interesting results.

For reference I used this material in the library CMU 8x16 w/Mortar MT

=OBJECTDATA(B3, subMtrlName, 1) - returns N/A for a compound object (based on material data sheet worksheet)

=COMPONENTMATERIAL(B3, 1) = does not return anything - is blank

=MATERIALPERCENT(T=MAT, 'Mortar MT') - returns 0 (Type=material i figured could have extracted something, but unfortuantely did not)

=MATPROPERTYBYNAME(B3, submtrlName) - returned #PARMS? - which is interesting because submtrlName would become a handle that can actually be processed in the worksheets.

 

@TomW Thought Id share in case you're experimenting

 

 

Link to comment
  • 0

This is a bit over my head now...!

 

2 hours ago, Samuel Derenboim said:

=MATERIALPERCENT(T=MAT, 'Mortar MT') - returns 0 (Type=material i figured could have extracted something, but unfortuantely did not)

 

It works when you tell it to look for a 3D solid e.g. =MATERIALPERCENT(T=XTRD, 'RC28/35 CONCRETE MT') or =MATERIALPERCENT(T=SOLIDCSG, 'RC28/35 CONCRETE MT') but doesn't seem to work if the object is a Slab or Wall (despite T=WALL being an example given in the function reference...)

Link to comment
  • 0
  • Vectorworks, Inc Employee

Hello @Tom W., @Samuel Derenboim,

 

I am not that familiar with materials so I had to dig down to see if what you want is possible, but I was not able to find this exposed to script or WS functions, so I think that at this time this is not possible. Please fill in a wishlist item to get this accessible in Script and WS functions so that it can be considered for future updates.

 

Best Regards,

Nikolay Zhelyazkov

  • Like 2
Link to comment
  • 0
3 minutes ago, Nikolay Zhelyazkov said:

Hello @Tom W., @Samuel Derenboim,

 

I am not that familiar with materials so I had to dig down to see if what you want is possible, but I was not able to find this exposed to script or WS functions, so I think that at this time this is not possible. Please fill in a wishlist item to get this accessible in Script and WS functions so that it can be considered for future updates.

 

Best Regards,

Nikolay Zhelyazkov

 

Thanks @Nikolay Zhelyazkov. Just to satisfy my curiosity, do you know why =MATERIALPERCENT() returns the percentage of a 'sub-material' assigned to an Extrude or Generic Solid but not to a Wall (or Slab), given in the list of Worksheet Functions it suggests it should:

 

Screenshot2023-08-17at08_13_44.thumb.png.9ac68821fe79c17a00b5b094f663d1ba.png

 

Thanks!

Link to comment
  • 0
  • Vectorworks, Inc Employee
14 minutes ago, Tom W. said:

 

Thanks @Nikolay Zhelyazkov. Just to satisfy my curiosity, do you know why =MATERIALPERCENT() returns the percentage of a 'sub-material' assigned to an Extrude or Generic Solid but not to a Wall (or Slab), given in the list of Worksheet Functions it suggests it should:

 

Screenshot2023-08-17at08_13_44.thumb.png.9ac68821fe79c17a00b5b094f663d1ba.png

 

Thanks!

- This function works with the object's material and is not looking at the component's materials, so I think that this is why it works with regular 3D objects only and not with walls and slabs that have the materials assigned to their components. Unless there is a way to assign a material directly to the wall/slab? I suppose that this should be possible with script but I am not really sure if this is correct.

Link to comment
  • 0
Just now, Nikolay Zhelyazkov said:

- This function works with the object's material and is not looking at the component's materials, so I think that this is why it works with regular 3D objects only and not with walls and slabs that have the materials assigned to their components. Unless there is a way to assign a material directly to the wall/slab? I suppose that this should be possible with script but I am not really sure if this is correct.

 

Ok thanks that's how it looked to me. I was just confused by the reference to Walls in the WS Functions. You can have a component-free Wall but can't assign a Material to it without given it a Component... So perhaps the WS Function description is wrong...

 

As an experiment I tried putting the function in a Data Tag but I couldn't get it to work there e.g. both #WS_MATERIALPERCENT(T=XTRD, 'RC28/35 Concrete MT')##WS_MATERIALPERCENT(T=XTRD, 'A393 Steel Reinforcement Mesh MT')# returned 0 when I tagged an Extrude in the drawing. I know @Samuel Derenboim wants to tag the Material % of a component but I thought tagging a 3D Solid would at least be a small step in the right direction but even that didn't work...

Link to comment
  • 0
  • Vectorworks, Inc Employee
8 minutes ago, Tom W. said:

 

Ok thanks that's how it looked to me. I was just confused by the reference to Walls in the WS Functions. You can have a component-free Wall but can't assign a Material to it without given it a Component... So perhaps the WS Function description is wrong...

 

As an experiment I tried putting the function in a Data Tag but I couldn't get it to work there e.g. both #WS_MATERIALPERCENT(T=XTRD, 'RC28/35 Concrete MT')##WS_MATERIALPERCENT(T=XTRD, 'A393 Steel Reinforcement Mesh MT')# returned 0 when I tagged an Extrude in the drawing. I know @Samuel Derenboim wants to tag the Material % of a component but I thought tagging a 3D Solid would at least be a small step in the right direction but even that didn't work...

In the data tag context, try skipping the first argument defining the criteria and see if that works? The data tag automatically passes the tagged object to the WS function like a database row, so no criteria is needed for it. Since this is a custom function it will use the document units precision, so if you see rounded values change them and it should show up fine.

Link to comment
  • 0
16 minutes ago, Nikolay Zhelyazkov said:

In the data tag context, try skipping the first argument defining the criteria and see if that works? The data tag automatically passes the tagged object to the WS function like a database row, so no criteria is needed for it. Since this is a custom function it will use the document units precision, so if you see rounded values change them and it should show up fine.

 

Aha perfect! It returns the values as decimals e.g. '1' for 100% + '0.75' for 75% so I had to add '*100%' to the formula to get it displaying correctly. Is this what you meant?

 

Screenshot2023-08-17at09_33_38.thumb.png.b546174842f0f91306c6b4ac789826b6.png

 

Not sure whether there's any practical use for this given you have to include the Material names in the tag definition. Plus it only works on solids. But interesting to look at nevertheless. Thanks for your insight!

  • Like 1
Link to comment
  • 0
  • Vectorworks, Inc Employee

@Tom W. @Samuel Derenboim I'm a bit late to the party so there is a lot to unpack here - let me start by saying that Data Tags can only tag Walls, but they can't tag Wall Components. This is why you need to use formulas like ComponentMaterial.

I sometimes use the Data Manager to map formulas to Wall data, IFC in particular has fields for Materials that you can populate with concatenated information like component material name + thickness etc. This would allow you to potentially enter different data to these fields but still use a single Data Tag to display it.

As far as I'm aware, there is no way of showing Simple Materials that constitute a Compound Material - you can get their accurate volumes for example Concrete = 0.95%Cement + 0.05%Rebar, so if you ask for quantity of cement, you will get a correct volume (which you can later use to calculate weight via density, or cost or embodied carbon) 

Of course, it depends what you're trying to achieve but there is a lot of flexibility between the Data Manager, Data Tags and Worksheet formulas to get you pretty much all data about objects in Vectorworks.

Link to comment
  • 0
1 minute ago, Luka Stefanovic said:

@Tom W. @Samuel Derenboim I'm a bit late to the party so there is a lot to unpack here - let me start by saying that Data Tags can only tag Walls, but they can't tag Wall Components. This is why you need to use formulas like ComponentMaterial.

I sometimes use the Data Manager to map formulas to Wall data, IFC in particular has fields for Materials that you can populate with concatenated information like component material name + thickness etc. This would allow you to potentially enter different data to these fields but still use a single Data Tag to display it.

As far as I'm aware, there is no way of showing Simple Materials that constitute a Compound Material - you can get their accurate volumes for example Concrete = 0.95%Cement + 0.05%Rebar, so if you ask for quantity of cement, you will get a correct volume (which you can later use to calculate weight via density, or cost or embodied carbon) 

Of course, it depends what you're trying to achieve but there is a lot of flexibility between the Data Manager, Data Tags and Worksheet formulas to get you pretty much all data about objects in Vectorworks.

 

@Luka Stefanovic thank you is there any way you could post a simple test file showing the kind of thing you're talking about with the Data Manager mapping data to IFC fields so that you can then report on it with Data Tags? I have only used the Data Manager to attach Records to objects by class but would like to use it more. It would be helpful to see examples of different uses in action. Thank you!

Link to comment
  • 0
  • Vectorworks, Inc Employee
On 8/24/2023 at 11:08 AM, Tom W. said:

 

@Luka Stefanovic thank you is there any way you could post a simple test file showing the kind of thing you're talking about with the Data Manager mapping data to IFC fields so that you can then report on it with Data Tags? I have only used the Data Manager to attach Records to objects by class but would like to use it more. It would be helpful to see examples of different uses in action. Thank you!

There you go! Hope that makes sense how it's set up and what it does. This one looks at component names and thicknesses rather than Materials, but the principle would be the same.

 

On 8/24/2023 at 1:36 PM, Samuel Derenboim said:

This includes worksheets I believe as well, right? (the inability to call out sub components of components)

Correct, currently it's not possible to list subparts (Components) and break them down into further parts in the reporting system. Something I know engineers are looking at, but I don't know if there is a solution coming.

 

  • Like 1
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
Answer this question...

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