LSP File

LSP File

don.sigman
Explorer Explorer
208 Views
2 Replies
Message 1 of 3

LSP File

don.sigman
Explorer
Explorer

I have written an LSP to create X# of layouts based on the input.  This part works great.

The next part, not so much.  I want it to create a Viewport in each layout based on MS x,y points.

When it creates the VP, it always asks for the start point, even though it is defined in the LSP.

I believe it has to do with mview.  From what I have read, it needs to have Active-X.  I have tried to install AutoLisp for Visual Studio, but there are no AutoCAD extensions found in the VS search.  I have tried multiple ways of writing it, but nothing is working.

0 Likes
209 Views
2 Replies
Replies (2)
Message 2 of 3

hmsilva
Mentor
Mentor

Try to change

(command "_mview" "_rectangle" "0.5,0.911" "33.5,21.5")

to

(command "_mview" "0.5,0.911" "33.5,21.5")

 

Hope this helps,
Henrique

EESignature

0 Likes
Message 3 of 3

Sea-Haven
Mentor
Mentor

If you set up a title block in say layout1 including a MVIEW matching that title block, you can use Layout Copy. You can also use Layout "T" for template which allows you to copy a layout from another dwg, handy when you have different size title blocks.  Once you copy the layout you can go into the viewport and using Zoom C Point  Scale, setting the matching point in model, then jump back to Pspace and assign the correct viewport Custom scale.

 

For me I draw rectangs then read all of them in one go, making the new layouts, so they match "Model". Note I also allow for twist in the viewport view. Three methods walk along a pline, insert 1 at a time, pick a point.

SeaHaven_0-1755215375172.png

 

SeaHaven_1-1755215426236.png

 

There are other examples here also about making layouts matching Model.

0 Likes