ChiefPlagman

Chief Architect
  • Posts

    31
  • Joined

  • Last visited

Everything posted by ChiefPlagman

  1. We do have tasks/requests logged to make global macros work with Ruby.
  2. "Global" text macros, such as "room.area.internal", are not parsed by Ruby. They are simply replaced with text.
  3. See "Measurement and NumberFormatter Classes" under "Ruby in Chief Architect" in Help.
  4. 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.
  5. If you're referring to the Plucker docs linked in the Downloads page on that site, I'm not familiar with that format or those downloads. PDB more typically refers to https://en.wikipedia.org/wiki/Program_database
  6. https://ruby-doc.org/core-2.4.0/Object.html#method-i-object_id Just to be clear, object_id is provided by Ruby.
  7. You can obtain the full text shown in the Size column with "=formatted_size", but that text is computed from the dimensions when the material list is generated. We don't currently expose the individual dimensions themselves. For the room, you could use =cabinet.room.name
  8. The list of units is limited whenever the Count column formula hasn't been edited. I don't think we currently have name-value pairs for drawer/door dimensions.
  9. The "Insert Macro" button in the cell editor offers a subset of available items when "Apply Formula to Source Object" is selected, including backsplash_length under the menu "Object Specific". For the backsplash row, there is a second menu called "Parent Object", which in this case refers to the cabinet itself. Items in that menu are prefixed with "cabinet." when they are entered into the cell (you may notice "cabinet" is also listed under the "Object Specific" menu. That means any property of the cabinet is available in that cell as long as it is prefixed with "cabinet."). Ideally, backsplash_height would show up there, but we're currently displaying a limited set of properties in that menu for usability reasons. If we listed everything, certain objects would cause the menu to grow very large. We're working on improving that UI. At the moment, there are two ways to see the complete list of properties (a.k.a "name-value pairs") for an object. 1. When you have an object selected in a view, open the Ruby Console and enter "owner.names.sort". 2. Use a User-Defined Text Macro, such as %object_properties%. Anything listed there for a cabinet is available in the material list. As a side note, name-value pairs that return numbers are either unitless, inches/millimeters, square feet/square meters, or cubic feet/cubic meters.
  10. You could enter = backsplash_length * cabinet.backsplash_height / 144 after choosing "Apply Formula to Source Object" in the Count column.