ChiefuserMathews Posted April 10, 2021 Share Posted April 10, 2021 I would like to know if I could find total area of a room multiplied with .05 to find out glazing area required for that room in a text box using ruby macro Link to comment Share on other sites More sharing options...
Alaskan_Son Posted April 10, 2021 Share Posted April 10, 2021 %room.internal_area*0.05% Link to comment Share on other sites More sharing options...
ChiefuserMathews Posted April 10, 2021 Author Share Posted April 10, 2021 27 minutes ago, Alaskan_Son said: %room.internal_area*0.05% Thank you for your reply, but for some reason it is not giving me the result Link to comment Share on other sites More sharing options...
Chopsaw Posted April 10, 2021 Share Posted April 10, 2021 3 hours ago, ChiefuserMathews said: Thank you for your reply, but for some reason it is not giving me the result It works the way you requested. Are you doing it a different way ? Link to comment Share on other sites More sharing options...
ChiefuserMathews Posted April 10, 2021 Author Share Posted April 10, 2021 Thank you all. As usual I was doing wrong instead of the text i was using box and adding macro to it. that's why it was not giving me the result. Once again thank you. Link to comment Share on other sites More sharing options...
MoeGia Posted April 11, 2021 Share Posted April 11, 2021 Following along, I'm wondering why the Chief supplied macros don't work with multiplication. Room.area.internal is Chief's macro, which doesn't work with multiplication. Yet Room.internal_area does. It seems like the program supplied macros should be editable. Obviously macros aren't my forte! Link to comment Share on other sites More sharing options...
ChiefPlagman Posted April 12, 2021 Share Posted April 12, 2021 On 4/11/2021 at 7:10 AM, MoeGia said: I'm wondering why the Chief supplied macros don't work with multiplication. "Global" text macros, such as "room.area.internal", are not parsed by Ruby. They are simply replaced with text. 1 Link to comment Share on other sites More sharing options...
Chopsaw Posted April 12, 2021 Share Posted April 12, 2021 2 minutes ago, ChiefPlagman said: On 4/11/2021 at 10:10 AM, MoeGia said: I'm wondering why the Chief supplied macros don't work with multiplication. "Global" text macros, such as "room.area.internal", are not parsed by Ruby. They are simply replaced with text. Thank you for the clarification. This particular situation although confusing has a ruby equivalent. Are you working towards providing other "ruby equivalents" or a way that other global text macro's as you call them can integrate with ruby and be parsed ? Link to comment Share on other sites More sharing options...
ChiefPlagman Posted April 12, 2021 Share Posted April 12, 2021 3 minutes ago, Chopsaw said: Are you working towards providing other "ruby equivalents" We do have tasks/requests logged to make global macros work with Ruby. Link to comment Share on other sites More sharing options...
MoeGia Posted April 12, 2021 Share Posted April 12, 2021 Thank you. I'd love to see global macros 'shortcuts'. It would be a huge help to those of us that need info out but don't understand the Ruby world. With my limited understanding, I can do a lot of damage pretty quick! Link to comment Share on other sites More sharing options...
Alaskan_Son Posted April 12, 2021 Share Posted April 12, 2021 29 minutes ago, MoeGia said: I'd love to see global macros 'shortcuts'. Can you expand upon what you mean by this? It sounds like you're describing the Insert Macro tool... Link to comment Share on other sites More sharing options...
MoeGia Posted April 12, 2021 Share Posted April 12, 2021 I think it would be great if Chief's Global Macros could be modified to report data such as percent glazing. In my post above, I started with the global room area and tried to multiply it by .08, which you can't do. I didn't understand that those macros don't work with ruby. I accept that they don't, but I don't have a enough of a grasp of Ruby to understand the nuances. I'm glad to see others have requested it in the past and it's on the list. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted April 12, 2021 Share Posted April 12, 2021 Michael, I'm not sure, but I think she's interested in knowing what the macros are that correspond to those and can be used in calculations. If so, then the only way I know of getting such a list if by use of an "_Object_Properties" macro. I have 3 of those depending on the amount of information needed. (full, short, short wo defaults). Rather complex macro to write but well worth it if doing any serious macro development. Link to comment Share on other sites More sharing options...
MoeGia Posted April 12, 2021 Share Posted April 12, 2021 Yes Joe, you're correct. I just want an easy way to get info out. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted April 12, 2021 Share Posted April 12, 2021 Hi Mo, I've attached my macro that lists all of the attributes of an object. It is sorted alphabetically and skips the attributes that are simply indication of if it's using the defaults for that object. If you import this into your plans you can select any object, open TMM and select this macro. It will show you all the available information and the names of the attributes that can be used in custom macros - or even directly in labels. If you need any help in using such attributes, let me know. _Object Properties wo _is_default.json 1 2 Link to comment Share on other sites More sharing options...
Chopsaw Posted April 12, 2021 Share Posted April 12, 2021 8 minutes ago, Joe_Carrick said: I've attached my macro that lists all of the attributes of an object. Hi Joe, That takes care of the ruby attributes that can be substituted for Cheif's Global macro's in an indirect sort of way. Thank You. Do you know if any one has taken the time to create a list of the ones that are not available for Natalie @ChiefPlagman so this can all be a little less confusing for everyone. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted April 12, 2021 Share Posted April 12, 2021 17 minutes ago, Chopsaw said: Do you know if any one has taken the time to create a list of the ones that are not available Sorry, I don't - but all Chief's "Object Specific" that contain a "." and not a "_" are unavailable for calculations. In most cases this is just the "Room Data". You will note that my macro shows the corresponding macros that do work. example: internal.area .... doesn't work internal_area .... works I'm pretty sure that the "Object Specific" for "Rooms" are the main ones that don't work. I think CA has converted almost everything else except their "Global" macros. 1 Link to comment Share on other sites More sharing options...
Alaskan_Son Posted April 12, 2021 Share Posted April 12, 2021 Just FYI, Chief provided their own OOB object_properties macro that works just fine too... X12 OOB Object Properties.json Link to comment Share on other sites More sharing options...
Chopsaw Posted April 12, 2021 Share Posted April 12, 2021 2 minutes ago, Joe_Carrick said: 19 minutes ago, Chopsaw said: Do you know if any one has taken the time to create a list of the ones that are not available Sorry, I don't Ok. I just was not sure if it is a matter of someone at Chief spending a few hours adding the ones that are not available or if each one would take a whole day of programming so we would be better off requesting specific ones and balance that out with new "ruby" feature requests and fixing stuff that is currently broken. Link to comment Share on other sites More sharing options...
Alaskan_Son Posted April 12, 2021 Share Posted April 12, 2021 2 hours ago, MoeGia said: I think it would be great if Chief's Global Macros could be modified to report data such as percent glazing. In my post above, I started with the global room area and tried to multiply it by .08, which you can't do. I didn't understand that those macros don't work with ruby. I accept that they don't, but I don't have a enough of a grasp of Ruby to understand the nuances. I'm glad to see others have requested it in the past and it's on the list. I understand all that. What I don't understand is how this relates to your request for 'shortcuts'. I don't see the connection. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now