Jump to content

set wall height


Recommended Posts

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?

Link to comment

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

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

×
×
  • Create New...