Available macro fields for every object


CARMELHILL
 Share

Recommended Posts

I've searched, and I can't find it, maybe it was in the old Chieftalk site, but I think Wendy posted a screenshot of how far we can automate the notation's on drawings with all the macros. Anyone remember that thread? And is there a way to list all the available macros and object fields for any object? I really need to maximize the automation. A full read through of "The Book of Ruby" is in my future, even though I DREAD getting into any kind of coding.

 

Thank you.

Link to comment
Share on other sites

I use a lot of macro's from Joe and Michael, Ruby access has greatly been enhanced since Wendy did her thing. I use them for site plan analysis , window's and doors and headers and have created some of my own for simple tasks. Macro's can be used for everything now. Really saves time

Link to comment
Share on other sites

Import this macro in TMM (Text Macro Management).  Then whenever you select an object you can open TMM and hi-lite _Object Properties to see all of it's attributes and their values.

 

Any of these attributes can be used in a label by simply placing by enclosing the attribute with %.....%.

The can also be used in a Text Box with Arrow.  In most cases CA has already provided Object Properties to be used in the Label.

 

Custom Macros can be written using the attributes as well.  If the custom macro begins with:

  • referenced ? obj= referenced : obj=owner

then you can simply place obj. in front of the attribute and it will work either in a label or in a Text Box with Arrow.

 

_Object Properties.json

Link to comment
Share on other sites

Couple more minor tips...

 

1.  Consider copying and pasting all the attributes for one of each object type that you're working with to a Word document or similar so that you can print up a hard copy.  I have several such pages handy so I can quickly and easily sort through the available attributes in a more easily readable manner. 

 

2.  When using the attributes in macros it can really make things easier to copy and paste the attribute name directly from the Object Properties Expanded Value field or from the aforementioned Word Document rather than typing it in manually.  It's just really easy to mistype something otherwise and end up with an error.  

 

 

Link to comment
Share on other sites

If you are using the default template plan that ships with Chief (profile.plan), there should already be a built in macro that will show you all of the object properties.  Just create a text object and draw an arrow from the text to the object you want the properties for.  Then open the text object up and you should see the %ObjectProperties% macro appear under the User Defined macro list.

 

Another way of seeing all of the available properties is to use the Ruby Console.  First, select any object in the plan.  Then open the Ruby Console and type in owner.names.  The list of available properties will show.  If you type in "owner.names.sort", they will appear in alphabetical order which makes it somewhat easier to find things. 

 

Link to comment
Share on other sites

10 minutes ago, Dermot said:

If you are using the default template plan that ships with Chief (profile.plan), there should already be a built in macro that will show you all of the object properties.  Just create a text object and draw an arrow from the text to the object you want the properties for.  Then open the text object up and you should see the %ObjectProperties% macro appear under the User Defined macro list.

 

Another way of seeing all of the available properties is to use the Ruby Console.  First, select any object in the plan.  Then open the Ruby Console and type in owner.names.  The list of available properties will show.  If you type in "owner.names.sort", they will appear in alphabetical order which makes it somewhat easier to find things. 

 

 Hey Dermot,  I think most of us that do anything more than occasional work with macros find it far easier to use the Expanded Value field to search through object attributes which is why Joe is recommending his modified Object Properties macro.  I use a modified version as well.  Actually,  anytime I open a plan that has the OOB macro in it, one of the very first things I usually do is at least modify that macro to work as an owner context.  I would really recommend you guys add an exception to the OOB macro so that it works in both contexts.  Super easy to do and far more effective.  Just my 2 cents.  

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