Recommended Posts

OK, so today I learned that Legacy is just a fancy term for obsolete.  See, I do know how to search :) 


I have numerous macros, from others and some I wrote.  Has there been any enhanced documentation regarding what "migrating" is going to do to my macros and what I can expect? Or how to fix issues? Is this going to put the brakes on my workflow?  I know enough to write small macros for menial tasks, but I do not have an extended knowledge.


Or is this just not a big deal?



Share this post

Link to post
Share on other sites
  • Macros from versions before X12 that have not been migrated should continue working in X12. You do not need to do anything if you merely want to use your existing macros or new macros that don't interact with your existing macros.
    • However, referencing a legacy macro that has not been migrated from a new macro written in X12 (or vice versa) might cause an error.
  • During the migration process you will be able to compare the results of the macro before and after migrating and have the opportunity to make changes if needed.
    • Not all macros will require any changes while migrating.
  • For more information, see "Considerations for Legacy Files" and "Migrating Legacy Ruby Code" in Help.

Share this post

Link to post
Share on other sites

The key here is that any distance or area attribute that was a "Floating Point" number in X11 is a "Measurement" in X12.  If you migrate a macro it will assume it's using the X12 "Measurement" data type and might not work the way it did in X11.


"Measurements" recognize a "unit" such as inches, feet, sqft, etc.  You can add, subtract, multiply or divide like measurement units - but you can't add or subtract a floating point or integer number to a measurement.


If you want to migrate your macros you have to make sure you follow those rules (and there are some more rules) ---- or make sure you convert attributes using .to_f in order to avoid execution errors.


My suggestion is to not migrate unless you are sure of what you are doing. 


I've taken the time to modify all my macros to work in X12 - it was not a trivial effort.  When I create new macros I try to use the "Measurements" but it requires understanding and implementing several new methods that are unique to Chief's X12 Ruby.  The Measurement Class is not a standard Ruby Class - it's an add-on created by CA.

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Member Statistics

    Total Members
    Most Online
    Newest Member
  • Similar Content

    • By Chiefer
      X12 RT. 10 passes 14 min
    • By GCCISarah
      Has anyone found how to re-name their Camera Callout Labels in X12? For example, my cameras are set up with a Callout Label of "C1, C2, C3..." etc etc. This is by way of some default setting that I cannot seem to find. Each new camera automatically labels and numbers itself in succession as noted above. However, I have decided I'd like name all of my future Full Cameras as "P1, P2, P3... " in a new plan. 
      Except for opening each individual camera to change the Callout Label, I cannot find a setting to change this default to start with a "P" and automatically number itself from there! It seems to be missing from the Full Camera Defaults page.. You CAN set a default for "Text Below Line" but not for the Callout Label itself for cameras?
    • By ccarpenter18
      In X12 I've noticed that when using Structural Member Reporting in a material list, the price column in the list does not appear to be sensitive to whether a "per unit" or "per length" calculation is being performed by the material list.  In both cases, the material list appears to use the same Price variable in the Component Panel of each object.  Does anyone know of some Ruby scripting that could be used to correct this?  Off hand, I'm thinking of a macro inserted into the Price variable on the Component Panel of each structural member that would use the Material List row context to report a price that depends on how the row wants to use the Price.
    • By mdarch47
      I apologize because I know this topic has been covered many times but I can't seem to find exactly the help I need from previous posts.
      I have created a simple room information label but wanted to modify it slightly.  See attached.  Want ceiling height to read in feet and inches and want to round the room volume to nearest whole number.
      A related matter is when I go in the text box and try to insert a user defined macro they are all grayed out. I was attempting to copy and modify the volume macro to round out, but could not insert the modified version.... Not sure why that is.
      If someone can point me in the right direction and or provide any assistance, that is greatly appreciated.
      Thank you,  Mike Dolce, Architect
      Chief V-X10