cadmaster1004 Posted July 13, 2022 Posted July 13, 2022 Nice to meet you. I am a student studying CAD. Ask for help. MODEL TAB has several blocks A. Is there an LISP that can make each block of A into LAYOUT tabs? For example, there are 10 TITLE BOX(block) in the drawing. I wonder if there is an LISP that generates 10 blocks of A into 10 LAYOUT tabs. Thank you. Example.dwg Quote
BIGAL Posted July 14, 2022 Posted July 14, 2022 If your studying CAD then work out how to do it manually 1st. You need to use the Layout command, I would set up Layout 1 with a border and a mview 1st. You can then make new layouts go into mspace and zoom to correct title area. Ok now for your blocks you need to look at the block and get each for each one the corners of the title block, so you can use this in the new layout with a zoom. Looking at your blocks they are 1 block but different scales. This is what layouts are for, you have a title at true scale 1:1 then have a mview inside it, then using mspace you set a scale for that viewport, this is contradictory to what you want but for me perhaps others the right approach, hence no code. 1 1 Quote
cadmaster1004 Posted July 15, 2022 Author Posted July 15, 2022 Thank you very much for your reply. There are more than dozens of block drawings in one file, so autolisp is required. And I know how to do it manually. Quote
mhupp Posted July 15, 2022 Posted July 15, 2022 I Think what BIGAL is trying to say it takes a little more to consider then select object make layout. you need to know what size of sheet, title block, and viewport. then figure out the scale of view port. the scale of block doen't really match up to any viewport scales. the suggestion of doing it manualy is to answer those questions Quote
Steven P Posted July 15, 2022 Posted July 15, 2022 Likewise, though my view is that a 'student asking for help' usually means you have an assignment to complete.. and I am not sure posting an full answer on here would help a lot - course tutors are able to look at the internet and it's forums as well..... Best we should do is offer hints, tips and answer specific questions (such as "why isn't this part working"). So if you can do it manually have you made up a LISP to do 1 block as a layout? Start off simple and just write the code to do it once, see if you can get that to work, then you can work on doing it for all blocks. Might be your process is: Select the block Get the block name Get the block 'bounding box', and it's coordinates Make a new Layout Tab and name it to the block name, set the paper size Make a view port to that paper size Zoom the view port to the bounding box coordinates Once you have the process written down - even simple like this - it is easier to go through each step and make it work. What looks like a complex problem is often a lot of simple problems all in a row. Then your question might change to "I have this LISP, selecting a block and it makes a layout, how can I alter it to select all blocks and make layouts from them all".. which might be a very simple answer 1 1 Quote
cadmaster1004 Posted July 20, 2022 Author Posted July 20, 2022 thank you for kind answer. have a good day^^ Quote
Recommended Posts
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.