See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: Adding Sheet Layouts to a tool palette

  1. #1
    Member
    Join Date
    2003-12
    Posts
    45
    Login to Give a bone
    0

    Default Adding Sheet Layouts to a tool palette

    Is there a way to add layouts from various drawings to a tool palette? I realize design center can be used to import layouts.

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,752
    Login to Give a bone
    1

    Default Re: Adding Sheet Layouts to a tool palette

    You can create a command string to import a layout from another drawing. The command is LAYOUT with the TEMPLATE option and you would need to supply the filename and layout name for the source drawing and layout you want to import.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    Member
    Join Date
    2003-12
    Posts
    45
    Login to Give a bone
    0

    Default Re: Adding Sheet Layouts to a tool palette

    If i had layout in a drawing located at ...L:\1 - SITE DEPARTMENT\3 - CAD\1 - C3D Template\Civil Sheet Templates\civil3d_XREF_DREF.dwg, what would that process look like?

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,752
    Login to Give a bone
    0

    Default Re: Adding Sheet Layouts to a tool palette

    Is this for full AutoCAD and not AutoCAD LT? If so, then you could use autolisp in your command, which could look like the following:
    Code:
    (command "_.layout" "Template" "L:\\1 - SITE DEPARTMENT\\3 - CAD\\1 - C3D Template\\Civil Sheet Templates\\civil3d_XREF_DREF.dwg" "Layout1")
    In AutoLISP, you will need to double the back slashes between folder names or replace each with a forward slash.

    Also, remember to change Layout1 to the specific layout name you are attempting to import.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  5. #5
    Member
    Join Date
    2003-12
    Posts
    45
    Login to Give a bone
    0

    Default Re: Adding Sheet Layouts to a tool palette

    Quote Originally Posted by Opie View Post
    Is this for full AutoCAD and not AutoCAD LT? If so, then you could use autolisp in your command, which could look like the following:
    Code:
    (command "_.layout" "Template" "L:\\1 - SITE DEPARTMENT\\3 - CAD\\1 - C3D Template\\Civil Sheet Templates\\civil3d_XREF_DREF.dwg" "Layout1")
    In AutoLISP, you will need to double the back slashes between folder names or replace each with a forward slash.

    Also, remember to change Layout1 to the specific layout name you are attempting to import.

    Not sure how to get this to the palette. Would i just create a new command from the command list and add your string to the macro line under properties?
    Attached Images Attached Images

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,550
    Login to Give a bone
    0

    Default Re: Adding Sheet Layouts to a tool palette

    If you need Page Setups added to plot those layouts as well Lee Mac's Steal from Drawing works well http://www.lee-mac.com/steal.html
    Code:
    ^C^C^P(Steal "Template" "L:\\1 - SITE DEPARTMENT\\3 - CAD\\1 - C3D Template\\Civil Sheet Templates\\civil3d_XREF_DREF.dwg" (list (list "Page Setups" (list "11×17" "11×17 PDF"))(list "Layouts" (list "Layout1" "Layout2"))))
    You would need to replace both the layout names and the Page Setup names.

    To import them with AutoCAD LT without lisp your macro would have to turn the system variable FILEDIA off first as in
    Code:
    FILEDIA 0 _.LAYOUT TEMPLATE "L:\\1 - SITE DEPARTMENT\\3 - CAD\\1 - C3D Template\\Civil Sheet Templates\\civil3d_XREF_DREF.dwg" "Layout1" FILEDIA 1
    then resetting FILEDIA afterwards.

  7. #7
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,752
    Login to Give a bone
    0

    Default Re: Adding Sheet Layouts to a tool palette

    There is a palette from the out of the box tool palettes titled "Command Tool Samples". On that palette, there should be a tool labeled "VisualLisp Expression". You can copy that tool to your clipboard and then paste into a new palette. From there, you should be able to edit the tool's command sequence to similarly match the code provided in this thread.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  8. #8
    Member
    Join Date
    2003-12
    Posts
    45
    Login to Give a bone
    0

    Default Re: Adding Sheet Layouts to a tool palette

    Thanks for the aid. I have successfully created the palettes with the desired outcome!!! Which leads me to an additional question...I am creating a new command to add to a custom toolbar. It will run a lisp routine located in the folder - L:\1 - SITE DEPARTMENT\3 - CAD\5 - LSP files\demo.lsp. What would the verbiage on the macro line look like ?

  9. #9
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,752
    Login to Give a bone
    0

    Default Re: Adding Sheet Layouts to a tool palette

    Is the AutoLISP routine already loaded?

    If it is not already loaded, you will need to first load it using the LOAD AutoLISP function.
    Code:
    (load "C:\\Path\\To\\File.lsp")
    The backslashes will need to be doubled in the function call-out or replaced with a single forward slash for each. That is how AutoLISP works.

    Is the routine executable from the command line without parenthesis surrounding it? If it can be called without parenthesis, you will need to add the parenthesis in your macro.
    Code:
    (c:NameOfRoutine)
    You can then combine all of that into a macro to add to a Tool Palette command.
    Code:
    ^c^c(load "C:\\Path\\To\\File.lsp")(c:NameOfRoutine)
    The two ^c prefixing the macro are to escape from any currently running commands. Two escapes are typically used.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. Replies: 0
    Last Post: 2011-10-11, 10:00 AM
  2. 2011: Adding layouts to existing sheetset - Sheet Name
    By bjhughes in forum AutoCAD General
    Replies: 3
    Last Post: 2011-03-07, 03:12 PM
  3. Replies: 1
    Last Post: 2006-09-15, 04:16 AM
  4. Adding block to Tool Palette
    By BCrouse in forum ACA General
    Replies: 15
    Last Post: 2006-08-30, 11:31 PM
  5. Adding LSP routine to Tool Palette
    By sodeepva in forum AutoCAD General
    Replies: 5
    Last Post: 2006-03-31, 11:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •