Text Macro Management - interesting fact


Joe_Carrick
 Share

Recommended Posts

When  Text Macro Management is opened, all macros are executed.  I originally thought that only a selected macro would be executed but it's actually every macro.  That is how the system determines which are valid and which are not.

 

There is an unintended consequence of this.  If there are any Global Variables that have been initialized with actual values - they could be modified by a macro that initializes those variables. 

 

It would be nice if there was an option to turn off this "All Macro Validation Check" so that the execution would be limited to "selected macros".  This wold need to be a setting in Preferences > General > Ruby.

Link to comment
Share on other sites

Joe as I start using the Macro's more and more I would also like to manage the Marco's even something like a lib of Macro's that could be setup with certain macro's we can put in there like the lib is setup or something like that

Link to comment
Share on other sites

Ray,

 

If you add the User Macros to your Default Plan Template and/or Default Layout Template as appropriate and "Save", they will be available for new Projects.  Note that some macros are used just in the Plan and others are used just in the Layout. 

 

I have asked for a "Browser" type organization for User Macros (Similar to the Library Browser) but Chief hasn't done that yet.  I hope they will have it in X8.

Link to comment
Share on other sites

So Macros need to be saved to the Default Layout  (Template) as well as the Default Plan (Template) if I want to use them in both?  this would explain what I am (not) seeing while in Layout.

 

Now that I am using Macros for Annotating Plans as Perry (?) suggested it would be great to have a Folder system like the library as the whole screen will soon be full using this Tip. It would also be nice if you could set a default Macro's folder too , it always open in My Docs.

 

thanks

 

M.

Link to comment
Share on other sites

Mick,

 

It depends on the macro. 

 

If it's a macro that needs to get attributes from a Layout Box then it needs to be added to the Layout.

OTOH, if it needs to get attributes from the Plan then it needs to be added to the Plan.

 

The only user macros that I have added to the Layout are:

 

1.  Filename macros (they get the full path and filename of Layout Box referenced Plan File)

2.  Custom macros to read/write "Consultant Info" files to store and retrieve data that Chief doesn't provide for. 

3.  Custom macros to read/write "Structural Data Files" that provide (loads, spacing, member properties, etc)

4.  Macros that I want or need to add to Text Boxes in the Layout

 

All other macros are in my Defaut Plan.

 

btw, Chief provides their "Global" and "Object" macros to display various data - those are available wherever you are (Layout or Plan & depending on the Object currently selected (if any).

 

NOTE:  If a macro is in the Plan and that view is sent to Layout then when the Layout Page is displayed it will activate that macro.  You don't have to actually open the view, just display the Layout Page.

Link to comment
Share on other sites

Thanks Joe 

 

I don't have 1-3  (no Ruby skills) but was wondering why some of the "Note" Macros I made weren't available in Layout , but I guess what is done in Layout isn't sent back to the Plan View so they force you to go back to the Plan view to add it ---  Which might be a better/safer way to do it I guess.

 

Mick.

Link to comment
Share on other sites

Thanks Joe 

 

I don't have 1-3  (no Ruby skills) but was wondering why some of the "Note" Macros I made weren't available in Layout , but I guess what is done in Layout isn't sent back to the Plan View so they force you to go back to the Plan view to add it ---  Which might be a better/safer way to do it I guess.

 

Mick.

 

100% Correct. 

 

Just about the only thing I put in the Layout in Text Boxes is on Page 0 - (Borders, Sheet Index, etc)  I do have some additional Text Boxes on a few pages - some of which have macros in them but I generally don't add any text if there's a Layout Box.  In that case the text belongs in the Plan.

Link to comment
Share on other sites

Ray,

 

If you add the User Macros to your Default Plan Template and/or Default Layout Template as appropriate and "Save", they will be available for new Projects.  Note that some macros are used just in the Plan and others are used just in the Layout. 

 

I have asked for a "Browser" type organization for User Macros (Similar to the Library Browser) but Chief hasn't done that yet.  I hope they will have it in X8.

Joe lets hope it will come in X8, along with step revamp

Link to comment
Share on other sites

  • 2 months later...

So I make  .plan A active window, that is running macros and using global variables,

then after switching to .plan B window to make active, I see

that chief doesnt automatically update the macros for .plan B - we have to force it manually - by opening the text management macro window dbx.

 

Yes it would be nice if a user preference setting for macros existed (that we can toggle on to force an automatic update when switching between .plan files) by default.

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