Jump to content

Recommended Posts

Posted

Hi, I am using this code to interpolate elevations between contours or points with text elevation.

I use block attributes for points in my drawings. Can anyone help me to update the code  to

1) Select the first block

2) Select the second block

3) Pick the new position for the block with the new elevation  (without point number, only elevation)

 

I attach the lisp code and a *dwg

 

Thanks

Lev_ct_v1_es.lsp Lev_ct_v1_es.dcl TEST.dwg

Posted

22kb of code - to speed things up for us, so we don't have to understand how all of it works, do you know the function in the code that you need to change to do what you want to do? Or can you look through it and give us a clue where to start looking for you?

Posted

Hi Steven P. I didn't write this code ...so I don't know ..

 

Thanks

 

Posted

but have you had a look to try and work it out yourself - and what did you find?

Posted

Yes, I try this code, is very good. Have 2 options.

1) Select the text of the Elevation of the first point and then the text of the Elevation of the second point, and then pick a point between the two points and calculate the new elevation and insert text. (You must have text, not mtext).

2) Select two contours or 3d polyline and pick a point between of them and calculate the new elevation and insert text.

 

This is all I know for this code. I try to translate the text with Google Translate. I don't know if someone in the forum knows Spanish to help up us with the translation.

 

Thanks

 

Posted (edited)

Hi 1985, I want to ask you something. I have a second block for elevetions I use, the same with the first but different colors . The name of the block is  " Ypsom "

I try to add it in the code like

 

 (setq h_next (atof AttrValue)
       h_new  (rtos (+ (* (/ (- h_next h_prev) dist_next-prev) dist_new-prev) h_prev) 2 2)
       bk     (vla-insertblock space
                               (vlax-3d-point (car pt_new) (cadr pt_new) 0)
                               "point,Ypsom"  ;<------Here
                               0.5
                               0.5
                               0.5
                               0.0
              )
 )

 

but didn't work. This code works only for one block? Is it possible to add two or three blocks and insert every tome the corret block (The same type with the selected blocks ) ? of course the block will be allready loaded in the drawing

 

Thanks

Edited by prodromosm
Posted (edited)

I need a sample of your block.

Do you know Russian?

Edited by 1958
Posted

No, I don't know Russian.Only with google translate 😀

Here is the sample with the other block

 

 

TEST.dwg

Posted (edited)

Thanks 1958. спасибо  😀

Edited by prodromosm

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...