Author Topic: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth  (Read 4015 times)

0 Members and 1 Guest are viewing this topic.

Something Clever

  • Mosquito
  • Posts: 3
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
« Last Edit: December 04, 2023, 04:28:52 PM by Something Clever »

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
« Reply #1 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,
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Something Clever

  • Mosquito
  • Posts: 3
Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
« Reply #2 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

Something Clever

  • Mosquito
  • Posts: 3
Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
« Reply #3 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?

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
« Reply #4 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
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
« Reply #5 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
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Move entities to ea. individual rounded z elevation X.X? Polylines - tenth
« Reply #6 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.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)