Jump to content
MullinRJ

Replacement command for deprecated SetWallHeights()

Recommended Posts

What is the replacement for VS command SetWallHeights()? The DevWIKI documentation says "See architectural category for replacement". So I went to Objects - Architectural and of the 125 commands listed absolutely nothing looked even remotely similar.

 

In the Objects - Wall section, WallPeak() looks like it could be made to function to set a "peak" at the end of the wall, but it is a MiniCAD 4 command and it doesn't seem like it would be the replacement for a command deprecated in VW 2012.

 

I assume I'm missing the obvious, so any help would be appreciated.

 

Thank you,
Raymond
 

Share this post


Link to post

I don't have time to play right now, but if you have a Wall that is not Bounded to a Story Layer (Level?) and that has no Wall Peaks, I think you can use SetObjectVariableReal 616 to set the Wall Average Height.

Share this post


Link to post

Thanks, Pat.

   I tried setting that ObjVar, but nothing happened. When I looked it up I saw it is READ ONLY.

 

   It seems strange that SetWallHeights() very easily set the wall's height at its beginning and its end. Why would a command like that be removed without another to take it's place? And if one did take it's place, it would be nice to see a note along with the deprecation notice showing which command to use in its stead.

 

   This short script achieves the look of the wall that SetWallHeights() produced, but the Wall Height in the OIP remains unchanged, which doesn't feel right. Is this the way to go?

PROCEDURE xxx;

	procedure SetWallHeightsN(H :Handle; StartWallHt, EndWallHt :Real);
	{ Set the wall heights at the beginning and end of a straight wall. Prior peaks are removed. }
	Var
		P1, P2 :Vector;
	Begin
		ClearWallPeaks(H);
		GetSegPt1(H, P1.x, P1.y);
		GetSegPt2(H, P2.x, P2.y);
		AddWallPeak(H, 0, StartWallHt);
		AddWallPeak(H, Norm(P2-P1), EndWallHt);
	End;		{ SetWallEndHeights }

BEGIN
	SetWallHeightsN(FSActLayer, 8', 9');
	SysBeep;
END;
Run(xxx);

Comments welcome.

 

Thanks,

Raymond

 

Share this post


Link to post

Pat, Julian, Thank you both.

 

   Julian, that is indeed the command I was looking for, but it does not work out of the box. On my first attempt using this function my initial excitement was quickly dashed when — nothing happened. Then I reread the thread Pat posted. At the end of his example script he included a ResetObject() command. Together these commands make the wall display as expected, but there was still something missing. Even after the wall height is set at either end, the HEIGHT parameter in the OIP does not update to reflect the change. I don't know if this is normal or not, but it didn't feel right to me, so I dug a little deeper.

 

   I drew two walls of different heights in a blank document and exported the file as VectorScript. The wall heights are set with ObjVars 604 to 607, which are marked as "Not for public use" but they work just fine if you don't tell anybody what you are doing, and you convert everything to mm first. These commands are followed by SetObjectStoryBound(), which sets the OIP fields HEIGHT and TOP OFFSET. Though I am still not fluent in Wall terminology, I feel much better with the output of these combined commands.

 

   Here's a small function I put together. I hope it helps someone get past these small hurdles. It should be pretty easy to modify this script to also set the bottom elevations of the wall, if needed. Comments and criticisms are definitely welcome.

	function SetWallHeights1(H :Handle; StartHt, EndHt :Real) :Boolean;
	{ Set the wall height at the beginning and end of a straight wall and update the OIP. }
	{ Return TRUE if the function works, FALSE otherwise. }
	Var
		B :Boolean;
	Begin
		B := SetWallCornerHeights(H, StartHt, 0, EndHt, 0);
		if B then begin
			SetObjectStoryBound(H, 0, 0, 0, '', 0);				{ affects OIP Top Offset }
			SetObjectStoryBound(H, 1, 0, 0, '', max(StartHt, EndHt));	{ updates OIP Height }
			ResetObject(H);
		end;		{ if }
		SetWallHeights1 := B;
	End;		{ SetWallHeights1 }

 

A little be of Pat, and a little bit of Julian, makes the world go round. Thanks, guys.

 

Raymond

 

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...