Jump to content
Ish

REQUIRE LISP FOR TO GET POLYLINE TEXT VALUE AT REQUIRE OFFSET

Recommended Posts

Ish
Posted (edited)

DEAR SIR,

 

I NEED A LISP TO GET OFFSET AND LEVEL OF POLYLINE.

VERTICAL SCALE AND OFFSET MAY BE DIFFERENT.  SOMETIME OFFSET REQUIRE 2,5,7.5 AND SAME VERTICAL SCALE 1:5, 1:10.  

IN ATTACH CAD FILE THERE IS 2 SITUATION NEED SOLUTION.

**FOR MORE DETAIL SEE IMAGE. 

PF LEVEL.JPG

ROAD SK.dwg

Edited by Ish
MODIFY

Share this post


Link to post
Share on other sites
dlanorh
3 hours ago, Ish said:

DEAR SIR,

 

I NEED A LISP TO GET OFFSET AND LEVEL OF POLYLINE.

VERTICAL SCALE AND OFFSET MAY BE DIFFERENT.  SOMETIME OFFSET REQUIRE 2,5,7.5 AND SAME VERTICAL SCALE 1:5, 1:10.  

 

**FOR MORE DETAIL SEE IMAGE. 

PF LEVEL.JPG

 

It is impossible to test a lisp on an image.:thumbsup:

 

The image also doesn't tell me the text size, text style, polyline details or layer details etc...

  • Like 1

Share this post


Link to post
Share on other sites
Ish
Posted (edited)
1 hour ago, dlanorh said:

 

It is impossible to test a lisp on an image.:thumbsup:

 

The image also doesn't tell me the text size, text style, polyline details or layer details etc...

 NOW IN CAD FILE YOU WILL SEE 2 SITUATION. 

ROAD SK.dwg

Edited by Ish
MODIFY

Share this post


Link to post
Share on other sites
dlanorh

OK, is the baseline (level datum) always arbitrary (lines Y coord is not the level)?

 

Option 1 has a baseline in option 2 this is a closed polyline which makes intersection points more difficult.

 

Will try to have a workable solution on monday.

  • Thanks 1

Share this post


Link to post
Share on other sites
Ish
33 minutes ago, dlanorh said:

OK, is the baseline (level datum) always arbitrary (lines Y coord is not the level)?

 

Option 1 has a baseline in option 2 this is a closed polyline which makes intersection points more difficult.

 

Will try to have a workable solution on monday.

YES BOSS the baseline (level datum) always arbitrary (lines Y coord is not the level)

YES - Option 1 has a baseline

option 2 this is a closed polyline - NO THAT IS ALSO  baseline (level datum). I JUST DRAW A RECTANGLE SIR, ASSUME THAT IS ALSO BASE LINE.

Share this post


Link to post
Share on other sites
dlanorh

Please look at attached drawing extract of situation 2. I am assuming it was just for reference and not correct?

situation_2.dwg

  • Like 1

Share this post


Link to post
Share on other sites
dlanorh
6 hours ago, Ish said:

YES BOSS the baseline (level datum) always arbitrary (lines Y coord is not the level)

YES - Option 1 has a baseline

option 2 this is a closed polyline - NO THAT IS ALSO  baseline (level datum). I JUST DRAW A RECTANGLE SIR, ASSUME THAT IS ALSO BASE LINE.

 

OK. Can I also switch the positions of offsets and levels so it is consistent with Option 1?

  • Like 1

Share this post


Link to post
Share on other sites
BIGAL
Posted (edited)

This is my SRL.lsp and reports level from pick point, a good starting point. At moment only Rl is worked out and for vertical scale. The offset could be done using same method. You pick the datum text, enter vertical scale, a datum point and pt of interest it updates an existing text.

 

SurfaceRL.lsp

Edited by BIGAL
  • Like 1

Share this post


Link to post
Share on other sites
Ish
8 hours ago, dlanorh said:

Please look at attached drawing extract of situation 2. I am assuming it was just for reference and not correct?

situation_2.dwg 73.31 kB · 0 downloads

100% correct sir, becoz i write roughly, but you make correct one. blue polyline was a 3dpoly i convert that, thats why z elevation is there. assume no z elevation.

calculation must be based on datum and center line.

 

thanks 

Share this post


Link to post
Share on other sites
Ish
3 hours ago, BIGAL said:

This is my SRL.lsp and reports level from pick point, a good starting point. At moment only Rl is worked out and for vertical scale. The offset could be done using same method. You pick the datum text, enter vertical scale, a datum point and pt of interest it updates an existing text.

 

SurfaceRL.lsp 2.45 kB · 1 download

CAN  UPLOAD SOME IMAGE  OR SCREEN SHOT,  HOW TO USE THIS LISP ,

Share this post


Link to post
Share on other sites
BIGAL
Posted (edited)

The program I wrote is used where you need a RL of a point based on a datum level it updates a existing text. Its about the method of how to do.

 

How are you making the pline, datum, and text rectang ? Why would you not just add to that procedure.

 

As I have said before purchase a commercial product it will do everything you want rather than the repeated questions of the next thing you want for free, hopefully your getting paid for this work.

 

I am happy to do it but will have a fee. I am an independent contractor I had to buy my CAD software if I wanted to even offer free stuff here.

Edited by BIGAL

Share this post


Link to post
Share on other sites
Ish
On 8/3/2019 at 11:14 PM, dlanorh said:

 

OK. Can I also switch the positions of offsets and levels so it is consistent with Option 1?

hello sir

Share this post


Link to post
Share on other sites
dlanorh

Sorry, very busy at the moment work wise. I should have something soon, just trying to iron out a few bugs.

Share this post


Link to post
Share on other sites
dlanorh

OK. Apologies for the time it has taken, but I had a "rush" job to complete that took up most of my time this past week.

 

Attached is the Lisp for Option 1, along with a question for option 2 which I've labelled as "3".

 

The drawing contains the maximum detail needed for the section, as the rest will be added by the lisp. The polyline will be automatically converted to run from left to right. The datum line will be converted from a polyline to a line (if required) and again set to run left to right. I needed it to do this to simplify the offseting.

 

This produces the two "SOLUTIONS" with the given offsets. The 0.0 and 10.0 (or end of polyline) are added automatically so don't have to be entered. If you don't require all this let me know.

 

Command to run (once loaded) is ODL.

 

You will be asked for the vertical exaggeration. Default is 1 (1:1). If the exaggeration is 1:5 you only need to enter 5

 

You will be asked to select the polyline, then to select the Datum Line, followed by the Datum Line Level (default 0.000), and finally the offset distances (default 0.000). As mentioned above the lisp knows the 0.000 offset (start of polyline) and the end of polyline offset; these are added automatically, so you only need to enter the intermediate ones. This is all collected in a while loop and the offset distances are added to a list. Once all the intermediate offsets are added return the default (0.000) to exit the loop and produce the solution.

 

I will attempt to added Solution 2 to this once I know all the requirements.

 

ROAD-SK-TEST.dwg ODL.lsp

  • Like 1

Share this post


Link to post
Share on other sites
Ish
On 8/12/2019 at 9:40 PM, dlanorh said:

OK. Apologies for the time it has taken, but I had a "rush" job to complete that took up most of my time this past week.

 

Attached is the Lisp for Option 1, along with a question for option 2 which I've labelled as "3".

 

The drawing contains the maximum detail needed for the section, as the rest will be added by the lisp. The polyline will be automatically converted to run from left to right. The datum line will be converted from a polyline to a line (if required) and again set to run left to right. I needed it to do this to simplify the offseting.

 

This produces the two "SOLUTIONS" with the given offsets. The 0.0 and 10.0 (or end of polyline) are added automatically so don't have to be entered. If you don't require all this let me know.

 

Command to run (once loaded) is ODL.

 

You will be asked for the vertical exaggeration. Default is 1 (1:1). If the exaggeration is 1:5 you only need to enter 5

 

You will be asked to select the polyline, then to select the Datum Line, followed by the Datum Line Level (default 0.000), and finally the offset distances (default 0.000). As mentioned above the lisp knows the 0.000 offset (start of polyline) and the end of polyline offset; these are added automatically, so you only need to enter the intermediate ones. This is all collected in a while loop and the offset distances are added to a list. Once all the intermediate offsets are added return the default (0.000) to exit the loop and produce the solution.

 

I will attempt to added Solution 2 to this once I know all the requirements.

 

ROAD-SK-TEST.dwg 71.95 kB · 1 download ODL.lsp 8.31 kB · 1 download

 

 

thanks for support sir 

it solve my problem 70%

 

i have some suggestion for you plz consider.

 

see below

 

===============================================================================================================

 

Situation -1

 

1.       Enter Vertical Scale Exaggeration (eg 1:5 = 5) <1> :

               Here we have 2 Vertical Scale 1:1 & 1:5    please add 1:10 also.

 

2.       Enter Datum Line Level <0.000> :

Here add pick text option

Pick Datum Level Or Type Datum Level <0.000>:

 

3.       Enter First Offset Distance or (0.0 to Exit) <0.000> :

Here don’t make fix offset 0.0 (by default is ok), may be some case I have first offset 10 or other value.

Here please add next line for fix interval

Enter the Interval (0.0 to Exit) <0.000> :

 

Example:

Enter First Offset Distance or (0.0 to Exit) <0.000> : 10

Enter the Interval (0.0 to Exit) <0.000> :2

 

 

If I type interval 2 automatically upto end of pline

Offset show 12, 14, 16, 18, 20 ….

 

*****************************************************************************************************************************

Situation -2

 Cross section

 

I need value at pline vertex. As you show in solution that is perfect for me.

I need exactly like that.

 

 

waiting for your good reply.

Thanks

 

-----------------------------------

Share this post


Link to post
Share on other sites
dlanorh
6 hours ago, Ish said:

1.       Enter Vertical Scale Exaggeration (eg 1:5 = 5) <1> :

               Here we have 2 Vertical Scale 1:1 & 1:5    please add 1:10 also.

 

This is not a selection. If the vertical exageration is 1:5 you enter 5 if it is 1:10 you enter 10. The default is 1:1 <1>.

 

If you want this as selection list thats not a problem. There is no problem with the rest.

 

  • Like 1

Share this post


Link to post
Share on other sites
Ish
Posted (edited)
27 minutes ago, dlanorh said:

 

This is not a selection. If the vertical exageration is 1:5 you enter 5 if it is 1:10 you enter 10. The default is 1:1 <1>.

 

If you want this as selection list thats not a problem. There is no problem with the rest.

 

no sir , I dont want selection list . I thought this is for 1:1 and 1:5 ONLY, NOW 1 CHECK . THIS IS FOR ANY VERTICAL SCALE, GOOD. NO. 1

 

whAT ABOUT FIX INTERVAL:  (POINT NO 3.) AND CROSS SECTION

 

** PLZ ADD A CODE FOR LAYER .      OFFSET, LEVEL AND GRID LINE MUST HAVE A SEPARATE LAYER..

 

THANKS

Edited by Ish
MODIFY COMMENTS

Share this post


Link to post
Share on other sites
dlanorh
Posted (edited)
13 hours ago, Ish said:

no sir , I dont want selection list . I thought this is for 1:1 and 1:5 ONLY, NOW 1 CHECK . THIS IS FOR ANY VERTICAL SCALE, GOOD. NO. 1

 

Too late :P I've already changed it. I suppose I'll have to change it back now.

 

13 hours ago, Ish said:

whAT ABOUT FIX INTERVAL:  (POINT NO 3.) AND CROSS SECTION

 

Interval already sorted. Cross Section with centreline is still in production.

 

13 hours ago, Ish said:

 PLZ ADD A CODE FOR LAYER .      OFFSET, LEVEL AND GRID LINE MUST HAVE A SEPARATE LAYER..

 

Layer Name and colour for each? I can't code what I don't know

 

Can you standardise the datum level as just a number 30 instead of DAT:30 as this would make it easier to re-use code? I am also using the height of this text for rest of the text to be inserted in that section.

 

And is it possible to make the centreline a line instead of a polyline as this requires less verticality checking?

Edited by dlanorh
clarity

Share this post


Link to post
Share on other sites
Ish
4 hours ago, dlanorh said:

Interval already sorted. Cross Section with centreline is still in production.

thanks sir, it means now i will type only one time and i will get value accordingly. good

for cross section i will wait sir. no problem

4 hours ago, dlanorh said:

Can you standardise the datum level as just a number 30 instead of DAT:30 as this would make it easier to re-use code? I am also using the height of this text for rest of the text to be inserted in that section.

Yes, Sir you can use number 30 instead of DAT:30, i write it for more information.

 

4 hours ago, dlanorh said:

And is it possible to make the centreline a line instead of a polyline as this requires less verticality checking?

Yes.  You can  make the centreline a line instead of a polyline.

 

 

4 hours ago, dlanorh said:

Layer Name and colour for each? I can't code what I don't know

it will be something like this

 

(setq clr (getvar 'clayer)) 
  (cond ( (null (tblsearch "LAYER"  "Coor Text")) (command "-layer" "_M" "Coor Text" "_C" 7 "" "")) (t (setvar 'clayer "Coor Text")))

 

 

thanks for good support.

 

plz upload update ODL.LSP

Share this post


Link to post
Share on other sites
dlanorh
11 hours ago, Ish said:

thanks sir, it means now i will type only one time and i will get value accordingly. good

for cross section i will wait sir. no problem

Yes, Sir you can use number 30 instead of DAT:30, i write it for more information.

 

Yes.  You can  make the centreline a line instead of a polyline.

 

 

it will be something like this

 

(setq clr (getvar 'clayer)) 
  (cond ( (null (tblsearch "LAYER"  "Coor Text")) (command "-layer" "_M" "Coor Text" "_C" 7 "" "")) (t (setvar 'clayer "Coor Text")))

 

 

thanks for good support.

 

plz upload update ODL.LSP

 

Attached is unfinished, but working updated lisp (Option 1 only). Everything will now be put into layer  "Coor Text".

 

 

ODL.lsp

  • Like 1

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