Jump to content

Search the Community

Showing results for tags 'layouts'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 16 results

  1. Hello Everyone, Been looking through lee mac's website for helpful lisp routines for work and found this copy2layouts lisp routine he created. When I start the command, it doesn't seem to select any objects I have within the layout for me to copy. Instead, it only selects object in the model space. Can anyone help me with this? And if Lee Mac see this, BIG FAN! Copy2LayoutsV1-1.lsp © 2020 Lee Mac DarkLightVLIDE ;;-----------------------=={ Copy to Layouts }==------------------------;; ;; ;; ;; This program enables a user to quickly copy a selection of objects ;; ;; to all or selected layouts in a drawing. ;; ;; ;; ;; Upon calling the program with 'C2L' at the command line, the user ;; ;; is prompted to make a selection of objects in the active layout to ;; ;; copy. Following selection, the user is prompted, via a dialog ;; ;; interface, to choose one or more layouts to which the objects will ;; ;; be copied. ;; ;; ;; ;; If the program is called with 'C2AL' at the command line, every ;; ;; object in the selection is automatically copied to all layouts ;; ;; in the drawing, without the use of the dialog interface. ;; ;; ;; ;;----------------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2013 - www.lee-mac.com ;; ;;----------------------------------------------------------------------;; ;; Version 1.0 - 10-02-2011 ;; ;; ;; ;; First Release. ;; ;;----------------------------------------------------------------------;; ;; Version 1.1 - 08-07-2013 ;; ;; ;; ;; Entire program rewritten. ;; ;;----------------------------------------------------------------------;; (defun c:c2l nil (copy2layouts nil)) ;; Copy to selected layouts (defun c:c2al nil (copy2layouts t)) ;; Copy to all layouts (defun copy2layouts ( all / lst obl sel tab ) (defun *error* ( msg ) (LM:endundo (LM:acdoc)) (if (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*")) (princ (strcat "\nError: " msg)) ) (princ) ) (if (= 1 (getvar 'cvport)) (setq tab (strcase (getvar 'ctab))) (setq tab "MODEL") ) (if (ssget (list (cons 410 tab))) (progn (vlax-for lay (vla-get-layouts (LM:acdoc)) (if (/= tab (strcase (vla-get-name lay))) (setq lst (cons (cons (vla-get-name lay) lay) lst)) ) ) (if (or (and all (setq lst (mapcar 'cdr lst))) (setq lst (mapcar '(lambda ( x ) (cdr (assoc x lst))) (LM:listbox "Choose Layouts to Copy to" (mapcar 'car (vl-sort lst '(lambda ( a b ) (< (vla-get-taborder (cdr a)) (vla-get-taborder (cdr b)))))) t ) ) ) ) (progn (vlax-for obj (setq sel (vla-get-activeselectionset (LM:acdoc))) (setq obl (cons obj obl)) ) (vla-delete sel) (LM:startundo (LM:acdoc)) (foreach lay lst (vlax-invoke (LM:acdoc) 'copyobjects obl (vla-get-block lay))) (LM:endundo (LM:acdoc)) ) ) ) ) (princ) ) ;;-----------------------=={ List Box }==---------------------;; ;; ;; ;; Displays a List Box allowing the user to make a selection ;; ;; from the supplied data. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2012 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; title - List Box Dialog title ;; ;; lst - List of Strings to display in the List Box ;; ;; multiple - Boolean flag to determine whether the user ;; ;; may select multiple items (T=Allow Multiple) ;; ;;------------------------------------------------------------;; ;; Returns: List of selected items, else nil. ;; ;;------------------------------------------------------------;; (defun LM:ListBox ( title lst multiple / dch des tmp res ) (cond ( (not (and (setq tmp (vl-filename-mktemp nil nil ".dcl")) (setq des (open tmp "w")) (write-line (strcat "listbox : dialog { label = \"" title "\"; spacer; : list_box { key = \"list\"; multiple_select = " (if multiple "true" "false") "; } spacer; ok_cancel; }" ) des ) (not (close des)) (< 0 (setq dch (load_dialog tmp))) (new_dialog "listbox" dch) ) ) (prompt "\nError Loading List Box Dialog.") ) ( t (start_list "list") (foreach item lst (add_list item)) (end_list) (setq res (set_tile "list" "0")) (action_tile "list" "(setq res $value)") (setq res (if (= 1 (start_dialog)) (mapcar '(lambda ( x ) (nth x lst)) (read (strcat "(" res ")"))) ) ) ) ) (if (< 0 dch) (unload_dialog dch) ) (if (and tmp (setq tmp (findfile tmp))) (vl-file-delete tmp) ) res ) ;; Start Undo - Lee Mac ;; Opens an Undo Group. (defun LM:startundo ( doc ) (LM:endundo doc) (vla-startundomark doc) ) ;; End Undo - Lee Mac ;; Closes an Undo Group. (defun LM:endundo ( doc ) (while (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark doc) ) ) ;; Active Document - Lee Mac ;; Returns the VLA Active Document Object (defun LM:acdoc nil (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (LM:acdoc) ) ;;----------------------------------------------------------------------;; (vl-load-com) (princ (strcat "\n:: Copy2Layouts.lsp | Version 1.1 | \\U+00A9 Lee Mac " (menucmd "m=$(edtime,$(getvar,date),YYYY)") "\n:: Available Commands:" "\n:: \"C2L\" - Copy to selected layouts." "\n:: \"C2AL\" - Copy to all layouts." ) ) (princ) ;;----------------------------------------------------------------------;; ;; End of File ;; ;;----------------------------------------------------------------------;;
  2. Hi there, I'm trying to convert a few thousand files from dwg to pdf and I believe I'm on the right track but am a little stuck. I'm attempting to use DWG TrueView though I have limited access to AutoCAD for like template creation and such. I seem to have trouble getting some of them to plot/publish and also it seems many of the layouts don't show the entire actual view (like I see 1/4 corner taking up the entire page) - scaling problems. My procedure is to create model and sheet page setup files in AutoCAD to use the built in DWG to PDF printer and 8.5" x 11" landscape. So I open the acad.dwt template file, and save one for model and one for layout after setting the above settings. I then open one of the drawings and run batch plot, then I set the list with all the layout only drawings (was going to do models later) and import the page setup file for drawings. I am getting an error saying the layout is not initialized -I was going to consider using AutoCAD and MultiBatch to initialize the layouts. If I attempt to plot now I currently do not see any PDFs created even though the logs say about 6 or so completed. Any thoughts? Thanks!
  3. Version 1.0.2

    869 downloads

    This small program works just like AutoCAD's GATTE express tool, with the extra option of choosing which layouts to apply attribute changes to. GATTE2 is made in lisp and uses CAB's Layout Select program to select which layouts you want. Make sure you place LayoutSelect.dcl in an AutoCAD search path or GATTE2 will not work! Required Files: gatte2.lsp LayoutSelect.dcl Both in gatte2.zip See this thread for more details. Function Syntax: gatte2 For instructions on how to run the program see here.
  4. Hi all. I've looked pretty much everywhere for a solution. I basically what to show the UCS at its origin, just like the command UCSICON>OR>ENTER but for all spaces. I can go this route but this means iterating through all the layouts. (foreach itm (append '("Model") (layoutlist)) (setvar "ctab" itm) (command "._ucsicon" "ORIGIN") ) Would there be a vla-put method for this?
  5. Hi all, firstly, apologies for my lack of technical terms on this, please bear with me whilst I try to explain what I am struggling with! Right, I have got a drawing of a school that we are designing the fire sprinkler layout on. For the initial approval drawings, I have printed it to scale an A0 paper which is fine. However, I am now looking at doing the construction issue drawings following the approval and I want these on no larger than A1 paper and a larger scale for ease of use on site. This is where my problem comes in. A colleague has previously split the original layout of another drawing up on the modal tab which worked, however, he was missing things when he made changes on one as he didn't move it straight over to the next saved area on another file. Therefore, I have seen it done before but not sure how, where it is a single model for the entire drawing, and then multiple layouts that show a pre-selected area on the model drawing to different layout pages. Does anyone have any advise on how to do this or a tutorial that I could read etc. I assume I would make a new layer for viewports and draw over the main drawing the areas where I want the splits, create my page layouts and then pick the referenced areas that I drew on the viewport layer? Any advice would be greatly appreciated. Thanks.
  6. Hi all, I have a colleague that came to me with a question. He would like to grab everything in a layout and scale it by 1.5X while at the same time having all of the viewports in that layout adjust their scales by 1.5 as well. I don't think there is a way to have AutoCAD automatically do this, but I thought I'd post it in case I'm wrong. Thanks.
  7. Hi all, I have about 140 layouts and I've just been asked to add a piece of information (some mtext) to every other layout, any ideas? Any help is appreciated, Dave
  8. Hi All. Im assuming this could be done via a lisp but not entirely sure. Im wondering if there is a way to create a layout with border plus a viewport that uses a polyline/block set in model space as its reference for its limits. Almost the opposite way that the change space command works but creating a viewport in the process. I basically have some polylines setup in a drawing that essentially ring around certain areas and would like to create layouts from these polylines and use them for the boundaries. Im wondering if there is also a possiblity that if i create a block or something, it could use the block name to create a tab also. Thank you in advance.
  9. Hey guys, hope your guys' summer have been awesome so far. I am working on a piece of code where I can save each layout as a 2004 autocad drawing (as well as bind any xref's and purge/audit the drawing). One of our clients requires this and depending on the project size it can take a long time manually. I was looking around for a code for a long time, and only one has come really close to what I was looking for... and I found it here I've taken certain parts of his code and b*stardized it to fit closer to my needs. One of the reasons using "wblock" doesn't work for my case is that I have templates made up with specific fields in the custom properties menu that I need to retain. Please note, this is a very rough and draft version. I haven't cleaned it up yet or added error checking yet. This was more of a tinkering/I never thought I'd be able to get it working project. So I got the code working great earlier this afternoon doing what I wanted it to do perfectly. I then started to work on error checking and fancying it up a bit when all of a sudden I'm getting a new error message: ; error: no function definition: VLAX-GET-ACAD-OBJECT I've since tried to undo/grab backups on this code and even using the restored version of the code (before this error starting showing up) and I'm still getting the same error. I don't know what's going on and I'm a bit in over my head. Any help with this is appreciated. (defun c:test (/) (foreach x (mapcar 'cadr (ssnamex (ssget "_X" '((0 . "INSERT") (410 . "MODEL")))));;select all objects (setq blk (cdr (assoc 2 (entget x))));; (if (assoc 1 (tblsearch "block" blk)) (command "_.xref" "bind" blk));;if an xref, bind into drawing );;end foreach (command "_.audit" "_yes" "" "_.audit" "_yes" "" "-purge" "_regapps" "" "_no" "_.purge" "all" "" "_no" "_.purge" "all" "" "_no" "_.purge" "all" "" "_no" );;end command (defun DelAllLayouts (Keeper / TabName) (vlax-for Layout (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object)) ) (if (and (/= (setq TabName (strcase (vla-get-name layout))) "MODEL") (/= TabName (strcase Keeper)) ) (vla-delete layout) ) ) );;end delalllayouts command (command "._undo" "_BE") (setq dn (getstring "Enter Filename: ")) (foreach lay (layoutlist) (setq path (getvar "DWGPREFIX"));;get filepath of the current drawing (setq filename (strcat path dn lay ".dwg")) (if (and (/= lay "Model") (> (vla-get-count (vla-get-block (vla-Item (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))) lay))) 1)) (progn (command "_.undo" "_M") (DelAllLayouts lay) (setvar "tilemode" 1) (command "_.ucs" "_w") (setvar "tilemode" 0) (command "_.zoom" "extents" "_.saveas" "2004" filename "_.undo" "_b" ) ) );;end if );; end foreach );;end defun
  10. stenna

    CTAB Field editing

    Evening All I have a scenario where I want to use some thing like the system variable CTAB in a field but have it report another Layout Name in the drawing rather than the Layout that I'm working in. Let me explain..... I'm producing phasing drawings for a well known supermarket and I use the Layout Tab name to drive the phasing dates within the Layout. ie P1 - Thu 23 Oct. I then use this to populate the title block etc with the system variable CTAB this saves me a whole load of time as I know the dates on the Layout tab name are correct and will therefore be right in the drawings (upwards of 25 drawings per project). I've just had a request to add some more information into the drawings but this has the date for the next phase ie P2 - Fri 24 Oct, I cant use the CTAB variable as it will report the wrong date ; Is there a way I can report another Layout Tab name with a system variable or through Diesel? Hope that makes sense! Stenna
  11. Hi All, I am having problems Xref ing a drawing of my new title block to paperspace. The plan is to try and have it as the default title block whenever I select to layout a drawing, can anybody help me with this? Regards Greg
  12. Hi folks I have a floor plan of residential building. In modeling mode the ratio is 1:1, after I fitted the drawing to my viewport in layout mode, the ratio is lets say 1:50. Does this effect my dimension? I used metric unit (Centimeter), because I thought when someone reads my drawing, he will count each 1 unit as 50 which I dont want. I know it sounds kinda rookie, bu pls som1 give some hands
  13. I have inserted an image to a layout for our drawings. On my computer the image shows just fine in the layout. On my co-worker's computer, she doesn't see the image when she opens the same layout. It shows the reference location- example-Z:\Facilties\blah\blah.jpeg I have AutoCAD 2013 and they have AutoCAD 2014 Is this why there is an issue? Please help, I want to add this template layout to all our drawings company wide, but if she can't see the image there is a major problem!
  14. Hello, I’m trying to save myself a bit of time and was wondering if it is possible to have part of the file location displayed in the title block? The current title block we are using shows the full file location of the drawing but I was wondering if it is possible to show only part of this? The reason I am asking is that when a project progresses to the next stage we have to go through each drawing and change the status to warrant, tender, construction etc. so I am looking for a way that this can be done automatically and I was thinking if only part of the file location could be used this process could be done by simply moving the drawings to the next folder? Our projects folders are split down in to subfolders for planning, warrant, tender etc. which corresponds with the status field on your layout. So instead of having to update this status manually every time the project progresses this would update to the folder that the drawings are in. Example: I:\Projects\## - Project Title\Drawings\Construction\Ground Floor Plan.dwg Am trying to get the "Construction" folder to display in the status field on the layout. I hope this makes some sort of sense and someone knows what i am trying to get at. If there is another way to achieve what I am looking for all suggestions are welcome.
  15. Hello, I have used the GATTE2.lsp and am indebted to the person who posted it. It's wonderful. Now I humbly ask if there is a way to use the LAYOUTSELECT.DCL in order to completely delete blocks from certain layouts. I would LOVE to learn how to program and work with lisps, dcls, dlls, etc. but no time is allocated for this in my division. I rely on the kindness of strangers. Thank you in advance for any help!
  16. Thanks in advance for any help with this issue. I was asked to convert a .DWG to a .PDF. The .DWG came from a manufacturer and displayed 3 pages worth of content that was seperated into 3 Engineering Drawings. The layout included all 3 pages. I want to Plot this document to a 3 Page PDF. Do I need to create 3 seperate layouts? How do I specify what part of the model goes into a particular layout? Is this a common problem? What is considered best practice for solving the problem.
×
×
  • Create New...