Jump to content

To create LAYOUT each of the blocks within the Model tab


Recommended Posts

Posted

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

Posted

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.

  • Like 1
  • Agree 1
Posted

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.

 

Posted

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

Posted

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

  • Like 1
  • Agree 1
Posted

thank you for kind answer. have a good day^^

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