Jump to content

Request for Lisp Routine to Automate Drawing Preparation and Layout Management


Recommended Posts

Posted

Hello everyone,


First, I would like to thank the forum owner and users for the valuable assistance they provide to AutoCAD users looking to enhance their work with new automated commands. I hope I’m not violating any forum policies with this post—please let me know if I am.


I’m looking for a Lisp routine to streamline the preparation of drawings, specifically by creating fixed rectangles, adding texts, and setting up titles for later filling. Additionally, the routine should automatically generate layouts and have the ability to update drawings by reading any manual modifications made by the user in the model tab. It should also support adding new drawings or rearranging the order of existing ones, with the ability to update layouts accordingly.


I understand that creating such a Lisp routine likely requires DCL, which can be complex. This is why I’m reaching out here, and I would greatly appreciate any help in developing this routine. I’m also open to collaborating with anyone who might be willing to offer this as a service.

For anyone interested, I am happy to provide further details and go into a deeper explanation of the Lisp functionality and conditions.


Thank you!

Posted

Yes, that is a very vague question. Perhaps add a sample file of what you want the end result to be

Posted

Thank you for your reply Steven P.

This drawing holds the explanation for the elements I want to create in both the model space and the paper space.
 

Each drawing rectangle represents a separated drawing.
 

The Lisp program should start with no drawings created, allowing the user to add drawings one by one. Each drawing will have its own page in a dialogue box where the user can modify or set specific settings, such as scale, titles. If the necessary layers do not exist, the program will create them, ensuring they match those in the reference drawing.
 

The program will include an optional button to automatically create layouts for all the drawings. When the user confirms that the preparation is complete, the program will generate the drawings and their layouts if the option is checked.
 

The program will also be able to update existing drawings. If the user makes manual edits to the model tab outside the program, the program should read and reflect these changes in the dialogue box. Users can modify drawings, and the program will synchronize the changes with the model and layouts.
 

For adding new drawings, the user can choose to insert them either at the end of the sequence or between existing drawings. In the latter case, the program will rearrange the drawings in the model tab and update the layouts accordingly.
 

Once the user confirms, the program will generate the layouts for all drawings, reflecting any changes made. The program will keep everything in sync, even if the user manually edits elements in the model tab.

Test.dwg

Posted

Just create a few templates and then do a simple import. I don't think having lisp setting them up is worth the trouble , but that's just me...

  • Like 2
Posted

Thank you rlx, I will consider your advice.

Posted

I'd also consider making the borders / title blocks as templates / blocks saved in an archive, insert as required (LISP can speed inserting up), with the text attribute text a required. The templates can have all the layers, line styles and so on defined so on import they are set in the drawing. That will probably remove the need for a dialogue box to edit each drawing titles, just double click to update (could also use Lee Macs Copy Swap Text LISP to copy details between drawings).

 

Creating a drawing could be done by LISP, highlight the area, specify the scale and enter the title details. This might have to be done single drawing at a time rather then pressing a button to create all layouts.

 

I think though, RLX suggestion of templates is the way to go, it might not be exactly what you want just now but I think could be close.

  • Like 1
Posted

Thank you, Steven P. I’ll consider your suggestion as well. I’ll probably go with this idea and create a Lisp routine for repetitive tasks like (Layouts creation) to save draftsmen time.


I really appreciate all the helpful suggestions from everyone.

Posted

no problem, ask again when you need and if you can break down what you need to do into smaller steps, perhaps individual LISPs rather than a big 'wish list' then you are more likely to get good help

Posted

Sure, I will! Thanks again for the encouraging support. 🙏

Posted (edited)

I have 2 make layouts lisp, working on a 3rd method. You can walk along a p/Line and it makes rectangs at correct scale matching your title block, it rotates the rectangs to following the line work so layouts are displayed horizontally. The second is a more grid style where you just make the 1st rectang at scale again then copy it see movie. The 3rd doing now is for more a parts style solution just pick a point in model, select scale and title block, matching layout is made. 

 

Multiradio2col34.png.e8f8746b7256073461193bead0dea7a0.png

 

 layout1.png.9d03ab6cd7fbd5b4a128c15fbe0c31bf.png

 

Ok a comment , for me you don't scale your mview shape, rather the mview is fixed shape within a title block, the title block exists in a layout at 1:1 scale, true size, the mview has its scale set to desired scale. See image above. Withe the title block fixed and at a known point like 0,0 it makes auto plotting easy. 

 

Ok I charge a price like a cup of coffee as the code needs to be set up to suit your title blocks. Yes can be imperial or metric. 

 

Also check the word doc.Lisp files Apr 2024.docx

 

Edited by BIGAL
  • Like 2
Posted

Just a ps made a movie of the 3rd method buts its like 38Mb if you want to look at it can send just PM me with an email link, will send via Wetransfer.

  • Like 1
Posted

Apologies for the late reply, BIGAL, and thank you for your valuable help! I’d definitely benefit from watching your video to gain insights for creating my Lisp if you don't mind.

The reason that I'm relying on the scale in the model space because many AutoCAD objects like dimensions, polylines, leaders, blocks, and linetypescales are affected by the drawing scale.

Additionally, later-stage software reads this information to operate correctly and ensure accurate output before submission.

I deeply appreciate your assistance and hope to learn more from you in the future!🙏

Posted

"AutoCAD objects like dimensions are affected by the drawing scale." if you make the objects annotative it should fix that problem. 

 

I have sent you a link for the video.

  • Thanks 1
Posted

Thank you for the Video, It was a great help by you. I will work on my lisp and share it as soon as it gets done. 😀

Posted

Why reinvent the wheel it is available already and tested etc the only edits are setting up the title block names and mview co-ords inside that title block. 

  • Like 1
Posted

I truly appreciate the offer, but still it is a different mechanism the one I'm thinking of, like the auto creation for the layouts with a single click including the naming, and assigning the title block option to another lisp routine that related to auto plotting for all layouts in the drawing.

I won't hesitate to ask for help after this encouraging support in my first post in the forum. Thank you all for your assistance 🙏🙏

Posted

"auto plotting for all layouts in the drawing." yep that is done already and has been posted here many times PLOTPDFRANGE.lsp. 

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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