TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: mohan on October 21, 2023, 10:30:19 AM

Title: Reading text value
Post by: mohan on October 21, 2023, 10:30:19 AM
Dear Colleagues,

While selecting a text entity for reading it's value 65.123 - The route as below works
Code - Auto/Visual Lisp: [Select]
  1. (setq txt (car (entsel "\nSelect numerical Text object: ")))
  2. (setq value (atof (cdr (assoc 1 (entget txt)))))

But for reading the Chainage value as 0+065.123
Need help to modify the route to work both ways.

Both Ways is too difficult !
Title: Re: Reading text value
Post by: HOSNEYALAA on October 21, 2023, 11:57:21 PM

can you see this

http://www.lee-mac.com/parsenumbers.html
Title: Re: Reading text value
Post by: mohan on October 23, 2023, 01:59:27 AM
can you see this
http://www.lee-mac.com/parsenumbers.html

Code: [Select]
_$ (LM:parsenumbers "0+065.123")
(0 65.123)
_$ (LM:parsenumbers "20+065.123")
(20 65.123)

Need lots to do.

This link is useful & modify for our requirement
https://www.cadtutor.net/forum/topic/71459-chainage-marking-on-plan-view/?do=findComment&comment=573447 (https://www.cadtutor.net/forum/topic/71459-chainage-marking-on-plan-view/?do=findComment&comment=573447)