CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.
Please abide by the
rules of this forum.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
Author |
Topic Search Topic Options
|
RJBPIII
Newbie
Joined: 28.Feb.2011
Location: United States
Using: 1995, 1998, 2002, 2011
Status: Offline
Points: 12
|
Topic: script file Posted: 28.Feb.2011 at 16:51 |
How can I run a script file from a macro. I have made a working .scr file, but have not figured out how to get a macro to run it. I tried the ^c^c "c:\file location information\filename.scr" and it tried to run each line seperate, If I just use the popup and click to open it, it will run the commands fine Would appreciate your assistance.
|
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com
|
|
John Connor
Senior Member
Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
|
Posted: 28.Feb.2011 at 16:56 |
I would think you could use your script file as a substitute for the macro.
|
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."
<<AutoCAD 2015>>
|
|
RJBPIII
Newbie
Joined: 28.Feb.2011
Location: United States
Using: 1995, 1998, 2002, 2011
Status: Offline
Points: 12
|
Posted: 28.Feb.2011 at 17:10 |
I have a tool bar and was going to use one of the Icons to run the .scr file could you explain how to do that direct?
|
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com
|
|
John Connor
Senior Member
Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
|
Posted: 28.Feb.2011 at 17:16 |
Run the macro from the toolbar icon. Why do you need a script? Seems redundant.
|
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."
<<AutoCAD 2015>>
|
|
RJBPIII
Newbie
Joined: 28.Feb.2011
Location: United States
Using: 1995, 1998, 2002, 2011
Status: Offline
Points: 12
|
Posted: 03.Mar.2011 at 20:33 |
I never could get the macro to work, but I did get the script file do do what I wanted. In using MicroStation, I have an Icon which will do the same as Zoom Extnets, Save both the file and the file settings and then close the file. I got a .scr file to do this, but could never figure out how to get the macro to preform these functions. I had the advantage in the Microstation VBA to record what I did and then go back and rename the recorded functions macro to something I wanted and then tie the recorded vba via run VBA "macroname" I am now assigned Autocad11 drawings to be done and I wanted to have some of the features I lost?
I was an electrician for over 40years and now I am a drafter, doing both types of drawings, only trying to learn short cuts. Thanks Richard
I will attach the .scr file if need to see
e ; SAVE ; close ;
That is what I have, is it possible to put comments in .scr files?
Edited by RJBPIII - 03.Mar.2011 at 20:38
|
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com
|
|
CarlB
Senior Member
Joined: 16.Oct.2009
Location: United States
Status: Offline
Points: 321
|
Posted: 03.Mar.2011 at 21:04 |
A macro to run a script should look more like:
^c^c_script;"c:\file location information\filename.scr";
or, without quotes
^c^c_script;c:\file location information\filename.scr;
and yes you can have comments in script file; start the line with a semicolon
|
|
RJBPIII
Newbie
Joined: 28.Feb.2011
Location: United States
Using: 1995, 1998, 2002, 2011
Status: Offline
Points: 12
|
Posted: 11.Mar.2011 at 21:25 |
Thank you so much for the reply, I have saved the information to try out.
|
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com
|
|
RJBPIII
Newbie
Joined: 28.Feb.2011
Location: United States
Using: 1995, 1998, 2002, 2011
Status: Offline
Points: 12
|
Posted: 16.Mar.2011 at 18:56 |
When you show the ^C is that using the symbol above the 6 key and just a capitol C ? I did not get to work this week and have a chance to try it out, I do apprecate any assistane. Did 2002 allow .scr files? That is what I am running at hope. I never used any .scr until the company gave me 2011 to work with. I had been just doing Microstation up till then.
|
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com
|
|