BIGAL Posted December 20, 2012 Posted December 20, 2012 Some more help Using Rectangles for plotting thats exactly what the code above does, the rectangle in this case is a title block ! DA1DRSHT. So if you make the rectangle a block change the name in my code to the name of your block and change the sheet sizes set to A1 above it will work for you. Remove (410 . "model") from above see edit. If your rooms have something unique like room number in the middle of them then you can make all the rectangles in one go, alternatively make a new layout via lisp jump into the viewport find the text zoom to a predefined scale jump back to paperspace adjust the title bock for the room Num go do next one. The program would be a combination of 2-3 already located somewhere here you can certainly do it in C# if you want using .net examples are probably Lisp but they would give you the method. Heres a start a layout picker at scale its cut from a big program so use only as a guide not tested. I think Lee-mac.com has a layout generator lisp he will advise. Uisng this idea you would find room centre and set viewport. Can you post a dwg say with 2-3 rooms (setvar "tilemode" 0) (command "_.pspace") (command "_.ZOOM" "ALL") (setq mp1 (getpoint "\nLower left corner of window:")) (setq mp2 (getcorner mp1 "\nUpper right corner of window:")) (setvar "clayer" vbdr) (command "_.mview" mp1 mp2) ; remove above for preset window size (command "_.mspace") (setq dummy (getpoint "\nPick pt in new window")) (setq sc (getstring "\nScale for this window 1: ")) (setq sc3 (strcat "1/" sc "xp")) (setq zc (getpoint "\nPoint to centre of view in Viewport:")) (command "_.zoom" "_center" zc sc3) Quote
AndyGrau Posted December 20, 2012 Author Posted December 20, 2012 Thanks AL, i already did it for this project without a script. But this stuff certainly sounds useful and i will give it a try the next time something like this comes up. Autogenerating layouts and title-blocks with the correct plan-number, appartment-number, plan-date and so on would also minimize room for errors with typos. I think i need to get a book on autocad scripting, its useful for other things too. Quote
BIGAL Posted December 21, 2012 Posted December 21, 2012 No worrys a book on Lisp rather than scripting. 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.