Guest Posted January 12, 2023 Posted January 12, 2023 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 Quote
Steven P Posted January 12, 2023 Posted January 12, 2023 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? Quote
Guest Posted January 12, 2023 Posted January 12, 2023 Hi Steven P. I didn't write this code ...so I don't know .. Thanks Quote
Steven P Posted January 12, 2023 Posted January 12, 2023 but have you had a look to try and work it out yourself - and what did you find? Quote
Guest Posted January 12, 2023 Posted January 12, 2023 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 Quote
Guest Posted January 13, 2023 Posted January 13, 2023 (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 January 13, 2023 by prodromosm Quote
1958 Posted January 13, 2023 Posted January 13, 2023 (edited) I need a sample of your block. Do you know Russian? Edited January 13, 2023 by 1958 Quote
Guest Posted January 13, 2023 Posted January 13, 2023 No, I don't know Russian.Only with google translate Here is the sample with the other block TEST.dwg Quote
Guest Posted January 13, 2023 Posted January 13, 2023 (edited) Thanks 1958. спасибо Edited January 13, 2023 by prodromosm Quote
Recommended Posts
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.