David Poiron Posted February 24, 2022 Share Posted February 24, 2022 Is there any way to report the wall thickness of wall that contains the door in a door schedule? I am of course using a database header in a worksheet row to get the list of applicable doors. Quote Link to comment
DuncanR Posted February 24, 2022 Share Posted February 24, 2022 We do this by reporting jamb size for internal doors as we design for timber construction so we have it set to 'use wall depth' anyway You could do the same for external doors but we don't because it looks unrealistic on our GAs. Unsure how you would report the wall thickness if your jamb size differs i'm afraid. Quote Link to comment
David Poiron Posted February 24, 2022 Author Share Posted February 24, 2022 This is how we do things currently but it would be helpful if we could simply refer to the wall width - this allows the door manufacturer to have more direct information, which we think would lead to fewer issues in the field. Quote Link to comment
DuncanR Posted February 25, 2022 Share Posted February 25, 2022 20 hours ago, David Poiron said: This is how we do things currently but it would be helpful if we could simply refer to the wall width - this allows the door manufacturer to have more direct information, which we think would lead to fewer issues in the field. Agreed, however i'm not aware of any way to do this currently. Maybe one of the pros will know @Matt Panzer? Quote Link to comment
Pat Stanford Posted February 25, 2022 Share Posted February 25, 2022 Try this. Copy the script below and paste it into a new blank Script Resource named "WallThickForDoor". The palette name does not matter. If the worksheet database header row put the following formula =RunScript('WallThickForDoor') This has been extremely lightly tested, so use at your own risk. It appears to work for both Styled and Unstyled walls. If a wall is not in a wall it will return three dashes instead of a number. Ask if you need more help. Procedure WallThickForDoor; {February 25,2022} {©2022 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty expressed or implied. Use at your own risk} {Test before useing on real data} VAR H1, H2 :Handle; R1 :Real; B1 :Boolean; BEGIN H1:=WSScript_GetObject; H2:=GetParent(H1); If GetType(H2)<>68 then WSScript_SetResStr('---') Else BEGIN B1:=GetWallThickness(H2,R1); WSScript_SetResReal(R1); End; End; Run(WallThickForDoor); 1 Quote Link to comment
Vectorworks, Inc Employee Matt Panzer Posted February 25, 2022 Vectorworks, Inc Employee Share Posted February 25, 2022 59 minutes ago, Pat Stanford said: Try this. Copy the script below and paste it into a new blank Script Resource named "WallThickForDoor". The palette name does not matter. If the worksheet database header row put the following formula =RunScript('WallThickForDoor') This has been extremely lightly tested, so use at your own risk. It appears to work for both Styled and Unstyled walls. If a wall is not in a wall it will return three dashes instead of a number. Ask if you need more help. Procedure WallThickForDoor; {February 25,2022} {©2022 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty expressed or implied. Use at your own risk} {Test before useing on real data} VAR H1, H2 :Handle; R1 :Real; B1 :Boolean; BEGIN H1:=WSScript_GetObject; H2:=GetParent(H1); If GetType(H2)<>68 then WSScript_SetResStr('---') Else BEGIN B1:=GetWallThickness(H2,R1); WSScript_SetResReal(R1); End; End; Run(WallThickForDoor); Yeah. What @Pat Stanford said. 🙂 I was thinking a script might be the only way to get at this. Thanks Pat! Quote Link to comment
Pat Stanford Posted February 25, 2022 Share Posted February 25, 2022 I don't know about the only way, but to me the simplest. I didn't even make any typos in writing that. It ran the first time. 😉 1 Quote Link to comment
Vectorworks, Inc Employee Matt Panzer Posted February 25, 2022 Vectorworks, Inc Employee Share Posted February 25, 2022 39 minutes ago, Pat Stanford said: I don't know about the only way, but to me the simplest. Yeah. I would have to do more digging to see if there is a way without a script. I I don't think so. 39 minutes ago, Pat Stanford said: I didn't even make any typos in writing that. It ran the first time. 😉 That is a very rare case for me but it SURE IS NICE when it happens! 🙂 Quote Link to comment
J P Posted August 8, 2023 Share Posted August 8, 2023 @Pat Stanford @Matt Panzer Hello, I came across this forum thread trying to get Wall Fire Rating of that contains the door to show up on the door schedule worksheet. Is there any function similar to getspaceforobj for doors? For example, getting the wall fire rating for door? Quote Link to comment
Pat Stanford Posted August 8, 2023 Share Posted August 8, 2023 This slight modification to the script above should return the String stored in the wall Fire Rating field. Procedure WallFireRatingForDoor; {August 8, 2023} {February 25,2022} {©2023, 2022 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty expressed or implied. Use at your own risk} {Test before useing on real data} VAR H1, H2 :Handle; R1 :Real; B1 :Boolean; S1 :String; BEGIN H1:=WSScript_GetObject; H2:=GetParent(H1); If GetType(H2)<>68 then WSScript_SetResStr('---') Else BEGIN S1:=GetObjectVariableString(H2,1212); WSScript_SetResStr(S1); End; End; Run(WallFireRatingForDoor); 1 Quote Link to comment
J P Posted August 8, 2023 Share Posted August 8, 2023 (edited) Thank you @Pat Stanford so much for the script! However, I am not sure if I have my fire rating data embedded into the walls correctly. It is not showing up on the door schedule worksheet. Do you have any idea why? Below is the worksheet I am working on - ignore the WallFR column. The column (Column V) with WallFireRatingForDoor is the far right one. I have also attached a screenshot of the object info palette data tab of the wall that door is sitting in. Edited August 8, 2023 by J P Quote Link to comment
Pat Stanford Posted August 8, 2023 Share Posted August 8, 2023 Please post your file (or a sample subset) so I can take a look. All I did was fill in the Fire Rating for the Wall in the OIP. Are you sure that the name you gave the script is exactly what you typed inside the quotes of the RunScript function? It does not matter what the procedure name inside the script is, only what the name is in the script palette and Resouce Manager. Quote Link to comment
J P Posted August 8, 2023 Share Posted August 8, 2023 Thank you @Pat Stanford Attached File is the one with the door schedule worksheet and scripts you provided in it. I noticed that I had a typo in the script name, but even with the correct name it does not show up the rating as in the wall data. I am wondering if the wall data has to be integer only? Template 230803.vwx Quote Link to comment
Pat Stanford Posted August 11, 2023 Share Posted August 11, 2023 I have no idea what is going on. When I posted the script it worked fine in my test file. Now I can not get ANY of the string wall data to return in any script across multiple VW versions. I tried Object Variables 1207-1209, 1212 (the one we want) and 1217-1221. All of them return an empty string. I not only tried on the parent of the door, but just on a selected wall. I tried both Styled and Unstyled walls. I am stumped. @MullinRJ Are you up for a challenge? Quote Link to comment
MullinRJ Posted August 11, 2023 Share Posted August 11, 2023 Hey @Pat Stanford, Yes, I'm always up for a challenge. Buuuuut, this time I think I may not be your best tag-team candidate. First off, you're doing ARCHie stuff. Second, you're dabbling with WALL properties. Both are somewhat out of my wheelhouse. That said, I jumped into the deep end first and attacked the Worksheet function, and the worksheet example in the file @J P posted. If you can imagine the sound of a brick wall being impacted, I made it. Next I simplified, and drew a Wall, selected it and ran a simple script to return its TYPE and its ObjVar value for 1212. I got 68 and '', as I did when I made the brick slamming sound. I then opened the ObjectVariables.h (for VW 2023) file and saw that 1212 was defined as you said it was : const short ovArchStyleFireRating = 1212; // TXString read/write - The fire rating (insertion option) - Public for VS Next, I took my script and Wall back to VW 2020 and tried again. This is where things got squirrelly, even for me. The script result was the same, but I couldn't find anything FIRE related in the OIP like I could in VW 2023; so I opened the SDK file MiniCadCallBacks.h (for VW 2020) and saw the following: const short ovArchStyleMark_OBSOLETE = 1207; // Obsolete const short ovArchStyleDescription_OBSOLETE = 1208; // Obsolete const short ovArchStyleFunction_OBSOLETE = 1209; // Obsolete const short ovArchStyleExterior_OBSOLETE = 1210; // Obsolete const short ovArchStyleLoadBearing_OBSOLETE = 1211; // Obsoleteconst short ovArchStyleFireRating_OBSOLETE = 1212; // Obsolete const short ovArchStyleCombustibleConstruction_OBSOLETE = 1213; // Obsolete const short ovArchStyleCompartmentation_OBSOLETE = 1214; // Obsolete const short ovArchStyleUValue_OBSOLETE = 1215; // Obsolete const short ovArchStyleRValue_OBSOLETE = 1216; // Obsolete const short ovArchStyleAcousticRating_OBSOLETE = 1217; // Obsolete const short ovArchStyleCostIndexSystem_OBSOLETE = 1218; // Obsolete const short ovArchStyleCostIndexCode_OBSOLETE = 1219; // Obsolete const short ovArchStyleModel_OBSOLETE = 1220; // Obsolete const short ovArchStyleManufacturer_OBSOLETE = 1221; // Obsolete const short ovArchStyleURL_OBSOLETE = 1222; // Obsolete Also obsolete are similar values in the 1118 to 1157 range. In VW 2023, the values 1207 to 1222 have defined values, but in VW 2019 to VW 2022, they are defined as OBSOLETE. I didn't check any earlier. I'm assuming the ObjVars are not returning values in VW 2023. Maybe they should be, but I have no way of knowing. This seems like a factory question, unless @JBenghiat knows off the top of his head. PUNT, the ball is now back in your court. Sorry Pat, that's all I've got. Raymond 1 Quote Link to comment
Pat Stanford Posted August 11, 2023 Share Posted August 11, 2023 Thank you @MullinRJ. That was the confirmation I needed that I was not just doing something stupid. Interesting that those Object Variables were marked as Obsolete in the SDK, but are still showing as active in the 2023 VS Appendix. Looks like it is time for another VS Documentation Bug. In a worksheet you can now use the Worksheet Function =ObjectData('Fire Rating') to get the data from an object. Two BUTs. 1. As far as I know ObjectData will only function on the object specified in a database subrow. I don't know of a way to make it function on the Parent of the database object. 2. I don't know how to access the data the ObjectData is getting from VS. So that means I can't even use a WS_Script to get the data from the parent. Time for more research. @Vlado Any ideas on obsolete ObjectVariables and how to get ObjectData in a script? 1 Quote Link to comment
Vectorworks, Inc Employee Vlado Posted August 23, 2023 Vectorworks, Inc Employee Share Posted August 23, 2023 Hey @Pat Stanford, @J P, and all, The root of the problem is that the available object variables are only for styles, and in this case you just have a wall. So, the way you get out data from the wall [nowadays] is via QTO functions, in this case it's =ObjectData('fire rating') Here is the modified script that executes the QTO function on the wall in the script: Note: you must do it via a string variable, for EvalStr to work property. It cannot work with direct string as parameter Procedure WallFireRatingForDoor; {August 8, 2023} {February 25,2022} {©2023, 2022 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty expressed or implied. Use at your own risk} {Test before useing on real data} VAR H1, H2 :Handle; R1 :Real; B1 :Boolean; S1, EXP :String; BEGIN H1:=WSScript_GetObject; H2:=GetParent(H1); If GetType(H2)<>68 then WSScript_SetResStr('---') Else BEGIN EXP := 'ObjectData(''fire rating'')'; S1:=EvalStr(H2, EXP); {Execute the Worksheet formula expression on the given handle} WSScript_SetResStr(S1); End; End; Run(WallFireRatingForDoor); 4 Quote Link to comment
J P Posted August 23, 2023 Share Posted August 23, 2023 (edited) @Pat Stanford @MullinRJ @Vlado Thank you so much everyone! It is working great ! Edited August 23, 2023 by J P Quote Link to comment
Pat Stanford Posted August 23, 2023 Share Posted August 23, 2023 @Vlado Thank you Vlado. I knew there had to be a way. I was not aware that the QTO functions could be accessed via EvalStr. 👍 Quote Link to comment
J P Posted September 1, 2023 Share Posted September 1, 2023 @Pat Stanford@MullinRJ@Vlado I have another question for Vectorworks Experts... Is there any way to attach a door frame symbol to a door object? I want to create a schedule of door frame types used in a project. However, I have not found a way to do this in an automated way. Currently, I just have a text-based worksheet with empty cells for door frame schedule to place symbols on top afterwards. It is a long shot, but I thought I might ask... Thank you! Quote Link to comment
Pat Stanford Posted September 2, 2023 Share Posted September 2, 2023 Not sure I understand the problem. Can you post a file with a few doors, a few door frames, and your worksheet so we can see what you are trying to do. 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.