Samuel Derenboim Posted September 18 Share Posted September 18 I know its a bit of an odd request, but I was curious, is it possible to count the same number of materials in a wall type using a tag? Lets say I have a wall type - 2 layers of gyp bd, framing and 2 layers of sheathing So far I have used the conditional statement : #MATPROPERTYBYNAME(COMPONENTMATERIAL(1), 'Materialkeynote')# line by line to describe each material. Is there a way to count the material in order to use 1 line to say 2 layers of gypsum board or etc...? Quote Link to comment
Popular Post Pat Stanford Posted September 18 Popular Post Share Posted September 18 @Samuel Derenboim, Samuel, Samuel, Samuel, I Love you!! You have just made Data Tags infinitely more powerful with your simple question!!!!! And maybe I am not answering your question, but I made a great discovery! The short answer to your question is No, base Data Tags can not display the number of components in a wall. But I just discovered that the #WS _ # Data Tag function will accept worksheet scripts!!! Create a script with the following code: Quote Procedure Comps; VAR N1:Integer; B1:BOOLEAN; BEGIN B1:=GetNumberOfComponents(WSScript_GetObject, N1); WSScript_SetResInt(N1); End; Run(Comps); Now create a Data Tag with the following Dynamic Text definition: Quote #WS_RUNSCRIPT(Comps)# You will now have a Data Tag that will display the number of components in a wall/slab/roof/etc. With a more complicated script you could do what you are asking and combine multiple components of the same material into a single result. Thank you!!! If you had not asked this question I would have never thought to try this. Thank you!! 6 2 Quote Link to comment
Samuel Derenboim Posted September 18 Author Share Posted September 18 (edited) @PatStanford, there is so much for me to learn from you, it's not even funny! The feeling is mutual my friend, believe me! Looks like i need to learn to script ASAP! Wonderful discovery! Edited September 18 by Samuel Derenboim Quote Link to comment
Pat Stanford Posted September 18 Share Posted September 18 We all are learning all the time. I am always amazed by just how much hidden power exists that no one ever thought to try! 1 Quote Link to comment
Recommended Posts
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.