Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Toolpalettes and dwt

  1. #1
    100 Club
    Join Date
    2005-09
    Posts
    140

    Default Toolpalettes and dwt

    I tried to drag/drop a .dwt (drawing template) file (both from the design center as well as through windows) onto a toolpalette and AutoCAD will not let me do it. Can someone confirm that this is not something that can be done, or am I just not doing it the right way. thanks
    Last edited by derek.96018; 2011-11-21 at 11:48 PM.

  2. #2
    Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    2,494

    Default Re: Toolpalettes and dwt

    If I might ask, why are you attempting to add your template to a tool palette?
    "Potential has a shelf life." - Margaret Atwood

  3. #3
    100 Club
    Join Date
    2005-09
    Posts
    140

    Default Re: Toolpalettes and dwt

    We use many drawing templates to start drawings. It would be much quicker to be able to click on a TP button to start a new drawing than navigating 2-3 folders deep to find the template we want to start with.

    So the basic questions is: Is it possible to put a file such as a .dwt on a TP ? (and have it start a new drawing) thanks Derek

  4. #4
    Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    2,494

    Default Re: Toolpalettes and dwt

    Quote Originally Posted by derek.96018 View Post
    We use many drawing templates to start drawings. It would be much quicker to be able to click on a TP button to start a new drawing than navigating 2-3 folders deep to find the template we want to start with.
    The purpose of the Tool Palette is to INSERT entities into the Active drawing, and not OPEN a new drawing AFAIK.

    Instead, consider using a Menu, Toolbar , and/or Ribbon button which calls a Macro or LISP to do this for you.

    Quote Originally Posted by derek.96018 View Post
    So the basic questions is: Is it possible to put a file such as a .dwt on a TP ? (and have it start a new drawing) thanks Derek
    You *can* create a custom Tool Palette using .NET (even one which hosts a Windows Presentation Foundation (WPF) User Control), and use the "ButtonName_Click" event to create a new drawing the desired template.
    "Potential has a shelf life." - Margaret Atwood

  5. #5
    100 Club
    Join Date
    2005-09
    Posts
    140

    Default Re: Toolpalettes and dwt

    Thank you for your suggestions. I would need to do research on both ideas to see if I have the ability to create them (and roll them out via our network to other users). Would you have some specific direction for me to look to educate myself ? I would appreciate it.

    I have created many toolbars/buttons, not a menu though. Pretty sure I could get that figured out pretty easy, it would be the macro/lisp to support that, that I would not be able to do.

    The drawing templates reside on a server.
    Thanks again, Derek

  6. #6
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,055

    Default Re: Toolpalettes and dwt

    Quote Originally Posted by derek.96018 View Post
    The drawing templates reside on a server.
    Are they all in one folder?
    If so, just go to Options\Files\Template Settings\Drawing Template File Location and point to the appropriate folder on the server.
    Unfortunately, you need to do this for each user\ user profile - but only once for each - or automate it.
    John B

    "With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion." - Steven Weinberg.

  7. #7
    100 Club
    Join Date
    2005-09
    Posts
    140

    Default Re: Toolpalettes and dwt

    Thank you....No, the drawing templates are in separate folders based on type of work, then Equipment Manufacturer.....

    Our 'Ctrl N' already navigates to the templates folder on the server, so it is a 'Ctrl N' to get to the templates folder, then 2 or more clicks to get to the desired folder.

  8. #8
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,055

    Default Re: Toolpalettes and dwt

    Okay, one other possibility (for others to consider, you almost certainly have too many choices) - make several desktop shortcuts using the "/t" switch to point to different templates.
    I think Renderman's suggestion to "consider using a Menu, Toolbar and/or Ribbon button which calls a Macro or LISP" is your best bet.
    John B

    "With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion." - Steven Weinberg.

  9. #9
    100 Club
    Join Date
    2005-09
    Posts
    140

    Default Re: Toolpalettes and dwt

    jaberwok, thanks... I think you are right... RenderMan's suggestion is probably the way to go... Actually doing a Ribbon tool bar would be good experience and easy to get to for the user.

    I need some help with the macro to launch a specific .dwt from a specific location, thanks

  10. #10
    Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    2,494

    Default Re: Toolpalettes and dwt

    I personally prefer to have most if not all of my Menu, Toolbar, and Ribbon macros load / execute a LISP routine, because there's so much more flexibility.

    That said, here's a simple LISP routine that will open a new drawing, from a found drawing template, and activate it:

    Code:
    (defun _NewDWGFromDWT  (dwt)
      (vl-load-com)
      (if (findfile dwt)
        (vla-activate
          (vla-add (vla-get-documents (vlax-get-acad-object))
                   dwt))
        (prompt "\n** Template cannot be found ** ")))
    ... A simple Macro for each drawing template should do the trick - just be sure to supply the appropriate File Path to the function as an argument. If your drawing templates reside in the Support File Search Paths (SFSP) then only a File Name should be required.

    HTH
    "Potential has a shelf life." - Margaret Atwood

Page 1 of 3 123 LastLast

Similar Threads

  1. Templates on Toolpalettes
    By ksmith.187551 in forum AutoCAD General
    Replies: 5
    Last Post: 2011-11-22, 11:24 PM
  2. Merging Toolpalettes
    By cadconcepts in forum AutoLISP
    Replies: 3
    Last Post: 2009-06-10, 01:10 AM
  3. Power of ToolPalettes
    By J17 in forum AutoCAD Customization
    Replies: 5
    Last Post: 2008-11-19, 04:11 PM
  4. Problem with the toolpalettes
    By fathibaali in forum AMEP General
    Replies: 1
    Last Post: 2008-09-28, 08:00 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
  •