Controlling when a macro executes


Joe_Carrick
 Share

Recommended Posts

Do you ever want a macro to be executed only when you specifically want it to?

 

Macros only execute when displayed so here's the trick:

  • Create a CAD Detail Window - name it the macro name
  • Add a Text Box and insert the macro in it

When you want the macro to execute just display that CAD Detail.

 

If the macro isn't anyplace else in the plan or layout it will only execute when that CAD Detail is displayed.  This is a great way to use a macro to set a global variable or perform some other task just when you want it to.

 

Note that you can have the CAD Detail Window open during a session of Chief but the macro will only execute when you switch to that tabbed view. 

  • Upvote 1
Link to comment
Share on other sites

3 hours ago, DRAWZILLA said:

Thanks Joe, not sure why I might need it though.

One way I use it when I want to create a new Project by automatically copying the current project.  The macro copies the entire folder structure and files of the current project - but renames everything.  It's a very advanced macro that combines several File_IO tasks.  

 

There are other cases that wouldn't be as complicated.

 

Basically this type of macro isn't designed to provide annotation.  Instead they perform disk management, file writing and reading to set/retrieve data that might be needed by other macros - but that don't need to be done very often.

  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share