pmadhwal7 Posted July 25, 2019 Share Posted July 25, 2019 Required LSP for interpolate Elevation between two text Drawing2.dwg Quote Link to comment Share on other sites More sharing options...
tombu Posted July 25, 2019 Share Posted July 25, 2019 Rather vague request. You want the difference in Elevation between two selected text objects? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 26, 2019 Share Posted July 26, 2019 Like tombu ?? (while (setq t1 (vlax-ename->vla-object (car (entsel "pick text object")))) (setq t2 (vlax-ename->vla-object (car (entsel "pick text object")))) (setq z1 (nth 2 (vlax-safearray->list (vlax-variant-value (vla-get-insertionpoint t1))))) (setq z2 (nth 2 (vlax-safearray->list (vlax-variant-value (vla-get-insertionpoint t2))))) (alert (strcat "The difference is " (rtos (abs (- z1 z2)) 2 2))) ) Quote Link to comment Share on other sites More sharing options...
dlanorh Posted July 26, 2019 Share Posted July 26, 2019 I thinke he wants to interpolate the elevation base on the text values of the two text items. Would still need to know what to use as the base points or if there is a node, and whether this is a random infill etc Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted July 26, 2019 Author Share Posted July 26, 2019 Sir, first you check the attachment, Drawing2.dwg Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted July 26, 2019 Author Share Posted July 26, 2019 28 minutes ago, dlanorh said: I thinke he wants to interpolate the elevation base on the text values of the two text items. Would still need to know what to use as the base points or if there is a node, and whether this is a random infill etc yes sir u r right.... Quote Link to comment Share on other sites More sharing options...
dlanorh Posted July 26, 2019 Share Posted July 26, 2019 34 minutes ago, pmadhwal7 said: yes sir u r right.... I can open your drawing, but it is not very informative. Can your repost with a before and after so I can see what you are trying to do. I have 3 or 4 lisps which do something similar to what you require, and this would help me adapt one for your needs. Also is this a random infill, or infill every "?" distance Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 27, 2019 Share Posted July 27, 2019 (edited) Ignore the infill request at the end of the day you will end up with a TIN answer irrespective of the number of points. Every 3 original points will make a plane. All you would be doing is add points to this plane. If you contour the points, then convert to lines with a z add end points delete lines infill done. If you want it more surface wise you need more original points. Maybe ucs 3 points then just add point will test. OR Do you just want points between two points given how many 4 10 20 ? pmadhwal7 you really have to explain more. Edited July 27, 2019 by BIGAL Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted July 30, 2019 Author Share Posted July 30, 2019 On 7/27/2019 at 10:41 AM, BIGAL said: Ignore the infill request at the end of the day you will end up with a TIN answer irrespective of the number of points. Every 3 original points will make a plane. All you would be doing is add points to this plane. If you contour the points, then convert to lines with a z add end points delete lines infill done. If you want it more surface wise you need more original points. Maybe ucs 3 points then just add point will test. OR Do you just want points between two points given how many 4 10 20 ? pmadhwal7 you really have to explain more. Sir, i just want to points and its not fixed sometime it was more the 3-4 sometime only 1 point Quote Link to comment Share on other sites More sharing options...
dlanorh Posted July 30, 2019 Share Posted July 30, 2019 15 minutes ago, pmadhwal7 said: Sir, i just want to points and its not fixed sometime it was more the 3-4 sometime only 1 point Try the attached. This will insert a level ramdomly around the mid point of the two levels selected (0.4 -> 0.6) of the distance infill_levels2.lsp Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted July 30, 2019 Author Share Posted July 30, 2019 48 minutes ago, dlanorh said: Try the attached. This will insert a level ramdomly around the mid point of the two levels selected (0.4 -> 0.6) of the distance infill_levels2.lsp 2.55 kB · 0 downloads lisp was working but levels is different if i draw one line in between two text and move any text to that line then Quote Link to comment Share on other sites More sharing options...
dlanorh Posted July 30, 2019 Share Posted July 30, 2019 30 minutes ago, pmadhwal7 said: lisp was working but levels is different if i draw one line in between two text and move any text to that line then !!?? The lisp is designed to create a new text entity between two existing text entities using their insertion points or text alignment points as the as the "line". It assumes said text entities have the correct levels (as text) within them. The text level displayed is an interpolation of the difference in the (text) levels at that point. Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted August 1, 2019 Author Share Posted August 1, 2019 On 7/30/2019 at 6:26 PM, dlanorh said: !!?? The lisp is designed to create a new text entity between two existing text entities using their insertion points or text alignment points as the as the "line". It assumes said text entities have the correct levels (as text) within them. The text level displayed is an interpolation of the difference in the (text) levels at that point. Sir check this, Quote Link to comment Share on other sites More sharing options...
dlanorh Posted August 1, 2019 Share Posted August 1, 2019 OK, a misunderstanding on my part. I assumed from your drawing that the text's textstring was the level. I will amend accordingly. Quote Link to comment Share on other sites More sharing options...
dlanorh Posted August 1, 2019 Share Posted August 1, 2019 OK. Try the attached. I'm not sure if this is exactly what you want but it's a bit closer. This will put a text at the MID point between the two selected texts and display its level. infill_levels2.lsp Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted August 2, 2019 Author Share Posted August 2, 2019 On 7/25/2019 at 6:07 PM, tombu said: Rather vague request. You want the difference in Elevation between two selected text objects? yes sir... Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted August 2, 2019 Author Share Posted August 2, 2019 20 hours ago, dlanorh said: OK. Try the attached. I'm not sure if this is exactly what you want but it's a bit closer. This will put a text at the MID point between the two selected texts and display its level. infill_levels2.lsp 2.33 kB · 1 download very close sir but in my dwg i have some code like 'BW , WL, etc. and the given lisp working only on elevation's also i din't want to elevation on particular i want random distance elevation.. Quote Link to comment Share on other sites More sharing options...
dlanorh Posted August 2, 2019 Share Posted August 2, 2019 (edited) 5 hours ago, pmadhwal7 said: very close sir but in my dwg i have some code like 'BW , WL, etc. and the given lisp working only on elevation's also i din't want to elevation on particular i want random distance elevation.. Then please try to explain in detail, what you want. A drawing with before and after examples would be fantastic. If you are inserting text that has a code, what should the code for the new text item be? Edited August 2, 2019 by dlanorh spelling Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted August 3, 2019 Author Share Posted August 3, 2019 please check the attachment input.dwg final.dwg Quote Link to comment Share on other sites More sharing options...
dlanorh Posted August 3, 2019 Share Posted August 3, 2019 1 hour ago, pmadhwal7 said: please check the attachment input.dwg 63.38 kB · 2 downloads final.dwg 76 kB · 2 downloads I give up. These drawings do not help me at all. I cannot see how or between what you wish to interpolate to arrive at final from input since the additional text items bear no resemblance levels wise to the existing. Quote Link to comment Share on other sites More sharing options...
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.