TheSwamp

CAD Forums => CAD General => Topic started by: Something Clever on November 29, 2023, 12:43:47 PM

Title: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
Post by: Something Clever on November 29, 2023, 12:43:47 PM
I have multiple polylines at different elevations.  Looking for a lisp or idea for setting entities to their individual z-value round tenth elevation.

Autodesk C3D 2023 Windows
Title: Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
Post by: kdub_nz on November 29, 2023, 03:05:46 PM

 Looking for a lisp or idea for setting entities to their individual z-value round tenth elevation.
:thinking: Data entry wastes my time.

Autodesk C3D 2023 Windows

Sounds like you want to select and auto-move each ?

But what determines the Zvalue ??

What is a 'tenth elevation.' ?

and how exact is 'round' as a location ?

Regards,
Title: Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
Post by: Something Clever on November 29, 2023, 04:14:38 PM
Clarification, the multiple entities have varying decimal elevations / z-values (XXXX.XXXXXXXXX') which i'd like to "auto-move" said entities to their individual nearest tenth of a foot (XXXX.X')

Thanks
Title: Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
Post by: Something Clever on December 26, 2023, 11:05:35 AM
If I were to set my unit precision to 0.0, could a lisp possibly then just copy and re-write each Z-value property as they already exists?
Title: Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
Post by: kdub_nz on December 26, 2023, 02:15:39 PM
I haven't played in feet and inches for more than 50 years, but this adaption by Alan of one of my metric converters may be of use.

this returns a string, so you'll need to run the string through ( atof str ) before you change the elevation value,

https://www.theswamp.org/index.php?topic=25549.msg307408#msg307408
Title: Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
Post by: David Hall on December 27, 2023, 05:11:53 PM
Lisp can do it, PSEUDO code

I would start by making a variable of the Z value, then search inside that for the "." (period), noting its position index number, grab next index number, and decide if you want to round up or down, then you could set the variable equal to the STRCAT( Left( Zvalue, Period postion ) and the rounded tenth)

Hope this helps
Title: Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
Post by: David Hall on December 27, 2023, 05:14:39 PM
If I were to set my unit precision to 0.0, could a lisp possibly then just copy and re-write each Z-value property as they already exists?
Problem is setting unit precision is sometimes a displayed precision.  Autocad still measures everything out to 14 decimal places, you just may not see it.