Pat Stanford 1,546 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 Share this post Link to post
Christiaan 933 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 Share this post Link to post
Christiaan 933 Posted October 8, 2014 Pat, I notice Pon='Window' isn't in the script. Should it be? Quote Share this post Link to post