Macro For Plotting

Macro For Plotting

Anonymous
Not applicable
1,560 Views
7 Replies
Message 1 of 8

Macro For Plotting

Anonymous
Not applicable

I am trying to create a macro to plot to a file, but can't get the macro to pull up a browse window instead of requiring a specific file name.  I could do it if it needed a file location, but file name is too specific to make this macro useful.  Is there a way to have the macro open the "browse for location" window at that point in the macro?

0 Likes
Accepted solutions (1)
1,561 Views
7 Replies
Replies (7)
Message 2 of 8

dennis
Advisor
Advisor

If you are working up your macro as an AutoLISP routine, you would need to get a DCL dialog box associated to the lisp routine.  I find DCLs a bit clunky to work with, and they end up usually looking nothing like the windows interface.  So, I would recommend looking into at least VBA or best at .NET for dialogs that then will become so much easier and consistent looking to the windows environment.  At the 'beginning of VBA' when it was introduced in AutoCAD, I often just made the dialog form, and then assigned my lisp routines to the buttons.

0 Likes
Message 3 of 8

Anonymous
Not applicable

To assign a filename inside AutoLisp:

 

(setq filename (getfiled "Select WHizard Graphics File" "c:/" "dwg" 2))

0 Likes
Message 4 of 8

SeeMSixty7
Advisor
Advisor

Another option to consider is OpenDCL. It offers a lot of expanded dialog functionality.

 

0 Likes
Message 5 of 8

Anonymous
Not applicable

We are using AutoCAD LT, so we don't have the option to use a lisp routine.  Is there a way to get it to work using a macro or a script?

0 Likes
Message 6 of 8

hmsilva
Mentor
Mentor
Accepted solution
Hi Chris
try to add a "~" in the macro to open the dialog box.
Untested.

Henrique

EESignature

Message 7 of 8

Anonymous
Not applicable

That's it.  Perfect.  Now we can macro all of our plotting!  Thanks a ton!

0 Likes
Message 8 of 8

hmsilva
Mentor
Mentor
You're welcome,
Glad I could help

Henrique

EESignature

0 Likes