ge25yak Posted March 16 Share Posted March 16 Hi, I was trying to set the height attribute of an unstyled wall at first floor to for instance 5m using vs.HWallHeight(h, 0, 5) or vs.SetWallHeights(h, 0, 5), but none of them worked. I just got none as returned values from both of them. Does anyone know how to adjust wall height properly via python api? Quote Link to comment
MullinRJ Posted March 17 Share Posted March 17 Hello @ge25yak, There may be other ways to set the wall height, but I found this works, so I stopped looking for other ways. The commands below always use mm, so you have to convert your document units to mm before setting the wall height values, hence the use of the scale factor variable "SF". This overly simple script will change the selected wall height to 5 (document units). I assumed meters in this case. Using your document units change the "newWallHt" value to your liking. import vs # Sample script to set the height (top elevation) of a selected wall. newWallHt = 5 # document units WallStartHeightTop = 604 WallEndHeightTop = 606 WallStartHeightBot = 605 WallEndHeightBot = 607 SF = vs.GetPrefReal(152) / 25.4 # units per mm H = vs.FSActLayer() vs.SetObjectVariableReal(H, WallStartHeightTop, newWallHt/SF) # starting height in mm vs.SetObjectVariableReal(H, WallEndHeightTop, newWallHt/SF) # ending height in mm vs.ResetObject(H) vs.SysBeep() HTH, Raymond 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.