Pat Stanford Posted October 7, 2014 Share Posted October 7, 2014 The following script was requested by a user to move all Space objects, Doors and Windows in a drawing to a height of 0 (zero) relative to the layer they are on. Procedure SetZHeight; {Sets the Z Height of all Space Object, Doors and Windows} {in a drawing to 0 (Zero) relative to the layer they are on} {Use at your own risk on a copy of any critical data.} {Do not use while operating heavy equipment} {All warranties expressed or implied are null and void upon} {reading this disclaimer} {May cause dizziness, dry mouth or heat palpitations.} {Use only under guidance of a physician} {October 7, 2014} {© 2014, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} Procedure SetSpaceZHeight(SSZHand:Handle); Var ZHeight: Real; OldName: String; TempName: String; Begin TempName:=Date(2,1); OldName:=GetName(SSZHand); SetName(SSZHand,TempName); ZHeight:=ZCoordinate(N=TempName); Move3DObj(SSZHand,0,0,-ZHeight); If OldName='none' then OldName:=''; SetName(SSZHand,OldName); End; Begin ForEachObject(SetSpaceZHeight,(((PON='Space')|(PON='Door')|(PON='Window')))); End; Run(SetZHeight); Quote Link to comment
Christiaan Posted October 8, 2014 Share Posted October 8, 2014 I do a lot of copy pasting of objects between layers and there is a bug in VW which changes the z height of objects in the process. Before this script I was spending a not insignificant amount of time going into Groups of objects and manually setting everything back to 0! Absolute gold, thank you Pat. Quote Link to comment
Christiaan Posted October 8, 2014 Share Posted October 8, 2014 Pat, I notice Pon='Window' isn't in the script. Should it be? Quote Link to comment
MullinRJ Posted October 8, 2014 Share Posted October 8, 2014 Scroll to the right... 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.