Jump to content

LISP for Z coordinates on screen and Plus Desired top of Curbstone Level


Qasim

Recommended Posts

Hi Everyone,

i,m looking for LISP Program that will display Z value of 3D points as A.L=0.000 (Asphalt Level) and prompt for height between Asphalt level and top of curbstone levels because its varies and display as C.L=0.000 (Top of Curbstone level) on screen.

i have a lot of data to process.

for format please see the attached image.

Curb Level.jpg

Link to comment
Share on other sites

1 hour ago, BIGAL said:

Block or more likely leader but you have not shown how Z's are obtained need image or dwg.

Mr. Bigal, 

it should be a Leader and Z,s are obtained from design drawing dwg, just like i have one LISP which can work for Z Label to show on screen in model space but i need it should calculate the second level in second row.

Please see the image attached.

Capture.PNG

Link to comment
Share on other sites

Did civil for like 40 years always picked a control point on kerb, like Back of kerb or lip we just defined the level and kerb type 'B2 'Sm2 theses were authority standard so all change in height known. 150, 125 etc. Did not do two levels.

 

If we did a non standard bluestone pitcher kerb again a block illustrating levels required was provided.

 

For you 175mm just google leader with mtext, and providing that point has a Z value not 0.0 can get RL. 

 

I would use a block with two attributes can mirror block or do a left and right.

 

If a point start with this

(setq ent (entget (car (entsel "Pick point"))))
(setq xyz (cdr (assoc 10 ent)))
(setq z (caddr xyz))
(setq pt (list (car xyz)(cadr xyz)))

 

 

Edited by BIGAL
Link to comment
Share on other sites

15 hours ago, BIGAL said:

Did civil for like 40 years always picked a control point on kerb, like Back of kerb or lip we just defined the level and kerb type 'B2 'Sm2 theses were authority standard so all change in height known. 150, 125 etc. Did not do two levels.

 

If we did a non standard bluestone pitcher kerb again a block illustrating levels required was provided.

 

For you 175mm just google leader with mtext, and providing that point has a Z value not 0.0 can get RL. 

 

I would use a block with two attributes can mirror block or do a left and right.

 

If a point start with this


(setq ent (entget (car (entsel "Pick point"))))
(setq xyz (cdr (assoc 10 ent)))
(setq z (caddr xyz))
(setq pt (list (car xyz)(cadr xyz)))

 

 

Mr. Bigal,

your are right there are types of kerbs, but here we have to calculate the RL for site surveyors top of Kerb and data provided to us is as Asphalt levels

we have also different heights of kertb stones like, 50mm, 175mm, 280mm, 160mm and also 850mm NJ Barriers. i was created a formula with field command that calculate the second level but problem was that i cannot place at desired location and that overlap the text.

kindly design a LISP that can easy my job.

thank you

Link to comment
Share on other sites

Quick and dirty you need to make the block TOCAL, extra steps are mirror yes/no, I need to find the Dim varaible to force padding on decimals.

 

(defun c:tocal ( / diff xyz z pt t1 t2)
(setvar 'attdia 0)
(setq diff (getreal "\Enter ht difference"))
(while (setq ent (entget (car (entsel "Pick point"))))
(setq xyz (cdr (assoc 10 ent)))
(setq z (caddr xyz))
(setq pt (list (car xyz)(cadr xyz)))
(setq t1 (strcat "T.O.C+" (rtos (+ diff z) 2 3)))
(setq t2 (strcat "A.L+" (rtos z 2 3)))
(command "-insert" "TOCAL" pt 1 1 0 t1 t2)

)
(princ)
(setvar 'attida 1)
)
(c:tocal)

If the lip line is a pline and the points are on the line then it can be a do all in one go.

Link to comment
Share on other sites

Mr. Bigal,

I tried but it is showing Error like "Invalid" Function cancelled 

First it Prompt for ht difference then say pick point, when i pick point it cannot work. 

Link to comment
Share on other sites

When I refer to a Point I am referring to an Autocad "Point". You can use the osnap Node to find these. I have set the osnap in the code so re download if the points do not have a level set then they should return 0.0.

 

2nd thing is I did it simply and made a block with a leader and two attributes and called it TOCAL if this does not exist it will not work, I did this as its easier than using leader and asking for extra points or having to calculate those points, that could be like a improved version 2 nd more than likely after a bit of testing you would have some questions.

 

If it does not work after making block "TOCAL" post a dwg much better than image.

 

 

 

Edited by BIGAL
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...