TheSwamp
CAD Forums => CAD General => Topic started 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
-
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,
-
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
-
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?
-
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
-
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
-
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.