Jump to content
pmadhwal7

Required Lsp for interpolate Elevation

Recommended Posts

pmadhwal7

Required LSP for interpolate Elevation between two text

Drawing2.dwg

Share this post


Link to post
Share on other sites
tombu

Rather vague request.

You want the difference in Elevation between two selected text objects?

Share this post


Link to post
Share on other sites
BIGAL

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

Share this post


Link to post
Share on other sites
dlanorh

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

 

 

Share this post


Link to post
Share on other sites
pmadhwal7

Sir,

first you check the attachment,

Drawing2.dwg

Share this post


Link to post
Share on other sites
pmadhwal7
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....

 

 

Share this post


Link to post
Share on other sites
dlanorh
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

 

Share this post


Link to post
Share on other sites
BIGAL
Posted (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 by BIGAL

Share this post


Link to post
Share on other sites
pmadhwal7
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

Share this post


Link to post
Share on other sites
dlanorh
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

Share this post


Link to post
Share on other sites
pmadhwal7
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 

Share this post


Link to post
Share on other sites
dlanorh
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.

Share this post


Link to post
Share on other sites
pmadhwal7
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,

 

 

 

 

Share this post


Link to post
Share on other sites
dlanorh

OK, a misunderstanding on my part. I assumed from your drawing that the text's textstring was the level. I will amend accordingly.

Share this post


Link to post
Share on other sites
dlanorh

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

Share this post


Link to post
Share on other sites
pmadhwal7
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...

Share this post


Link to post
Share on other sites
pmadhwal7
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..

Share this post


Link to post
Share on other sites
dlanorh
Posted (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 by dlanorh
spelling

Share this post


Link to post
Share on other sites
dlanorh
1 hour ago, pmadhwal7 said:

 

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.

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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