Is there a way to create a new drawing from a template using the toolpalette.
I have tried dragging the .dwt file into the toolpalette but had no luck with that!
Any ideas?
Many thanks!
Is there a way to create a new drawing from a template using the toolpalette.
I have tried dragging the .dwt file into the toolpalette but had no luck with that!
Any ideas?
Many thanks!
Use this as the command string on a toolpalette tool. A new dwg will be created using the Acad.dwt as the template. Edit as you want.
Code:(vl-load-com)(vla-activate (vla-add (vla-get-documents (vlax-get-acad-object)) "acad.dwt"))
Many thanks for the reply.
The code works great. However, I need a similar code that works within LT.... I have tried all kinds of C^C^ macro combinations but I can not seem to work out the correct code for this little puzzle! There has to be a way surely lol
That code's a lisp expression, LT don't do Lisp.
Maybe you could use a script file. Basically a text file containing all the keystrokes you'd issue at the command line. E.g. the attached (rename to Test.SCR). Then your macro would be something like:Unfortunately you can't use the new directly in a macro, since then the dialog opens - which is not possible to automate. You could go and set FILEDIA=0 before, but then you need to set it back, and if an error occurs you end up with users asking you why they can't open files anymore.Code:^C^CSCRIPT;"C:/FullPath/Test.SCR";
Thus I'd go with Lisp as a 1st choice, Script if in LT.
Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!
Spot on with the script !!
Works a treat!
Many thanks!
Hi, I know this is an old posting, but hopefully i'll still get a response from this... doing the same thing here.... trying to start a new drawing from a dwt by clicking a TP button, but using full version AutoCAD 2009.
Done quite a bit of work with TPs.... but sorry to sound dumb.... how do I get a "toolpalette tool" onto the TP ? the image posted of the TP properties does not look like mine. Mine looks like this image but is for inserting a block
... so I got the macro working, now I just need some help getting the correct tool on the TP so I can activate it from there, thanks for the help
Last edited by derek.96018; 2011-11-28 at 06:40 PM.