Auto creating viewports with included drawinghead (Scaled)

Auto creating viewports with included drawinghead (Scaled)

Anonymous
Not applicable
833 Views
6 Replies
Message 1 of 7

Auto creating viewports with included drawinghead (Scaled)

Anonymous
Not applicable

Hello, i am a Civil engineering student and am completely new to LISP, i hope to find some tips or a little push towards the right direction. 

 

I have recently started an intern for a Civil company that designs things related to railways. They asked me if i could take a look into the automatic creation of a Viewport, a border of the drawing and the suitable drawing head. 

 

I am not sure if i'm in the right direction but i figured that it should be possible to detect the outer points of my drawing with the functions in AutoLisp. After finding the outer points of the drawing i'd like to create a viewport automatically with included borders and drawinghead.

 

So basicly if my LISP would detect that a drawing's outer points are just under the size of a A4 then select A4 with included A4 drawinghead and scale. However if the outer points are just over the size of an A4 then it should select an A3 paper with included A3 drawinghead and scale. 

 

Does anyone here have any experience with something similar? Or does anyone know what functions could be used?

 

 

0 Likes
834 Views
6 Replies
Replies (6)
Message 2 of 7

maratovich
Advisor
Advisor

Watch it - Revers 
And watch it - AutoViewport 

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 3 of 7

Anonymous
Not applicable

i will go and watch that right now.

 

Thank you 🙂

0 Likes
Message 4 of 7

Anonymous
Not applicable

I have watched the video's and even though i think that there are certain things in the program that you developed that could help me out, i dont think that this is what i and they are looking for. 

 

The main problem i want to tackle is having designers spend time on figuring out what papersize and drawing head etc should be used with the drawing. I want LISP to do that for them and that didnt really come back in any of the video's. 

 

Thank you anyway. 

0 Likes
Message 5 of 7

maratovich
Advisor
Advisor

1. Attach your example.
2. Show it to your users, they will pick it up right away.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 6 of 7

Anonymous
Not applicable

To be fairly honest i have no example yet.

 

I was asking for tips/ a push in the right direction because i have no experience on this subject and just started today,  but after thinking about it for a while i thought of this;

 

* Get Coordinate (X+)

* Get Coordinate (X-)

* Measure distance X+, X-

 

* Get Coordinate (Y+)

* Get Coordinate (Y-)

* Measure distance Y+, Y- 

 

**** This would be how i would determine what my max/minimal X and Y values are (Still need to find the right functions)  afterwards i figured with an if/else statement i could implement the papersizes starting with the smallest papersize we use being A4 (210x297) and then up to A1.  ****

 

* If measure distance X+, X- < 205 and Measure distance Y+, Y- <292 then select papersize A4 

 

* Else 

 

* If 

measure distance X+, X- < 292 and Measure distance Y+, Y- <425 then select papersize A3 

 

*** I dont really have any experience with programming or with the different set of functions in AutoLisp so it would really be helpfull if i could get some comments or tips on this, I dont want u to write me a code i just want to know if im heading into the right directions and if there's certain functions that could be of help which i obviously as of right now dont know anything about yet. *** 

 

 

 

0 Likes
Message 7 of 7

maratovich
Advisor
Advisor

The Revers does it all.

Take an example .dwg file from your users.

Without an example - Tarot cards.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes