Joe_Carrick Posted September 6, 2023 Share Posted September 6, 2023 Here's the Template I use for all my macros. It provides for error trapping and an explanation of the code. I hate to have a macro fail with #evaluation error# so I trap errors and return an explanation of the error. I also liberally place comments in the script so I know what each section is supposed to do. ############################################# # YODA'S MACROS - X15 CERTIFIED ON 11-25-2022# Copywrite By Joseph P. Carrick############################################## Macro Name & Description# <Name># <Description>############################################# # Set Context and initialize result. # Make valid for Referenced or Owner Object #############################################referenced ? obj= referenced : obj=owner result = "" ############################################# # Trap errors and provide an explanation # begin / rescue / end & if / elsif / else / end # sequences can be nested any number of # levels as needed. #############################################begin # Conditional processing where an error # might occur. This code must define the # value for result. result = <ruby code using object NVPs>rescue # explanation of error result = <Error occured because .....> -or- result = default value (what you want to use as a default)end ############################################# # Display result ############################################# result Here's the Notepad++ "rb" file for editing with Ruby Language formatting. MacroTemplate.rb 5 2 Link to comment Share on other sites More sharing options...
5FT-20Designs Posted September 6, 2023 Share Posted September 6, 2023 Thanks Joe. Been working on some macros, but have a long way to go & a lot to learn. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted February 7 Author Share Posted February 7 The template is just that. It provides a framework for good ruby scripts. You still have to ad your code. Link to comment Share on other sites More sharing options...
Seacoast Posted March 11 Share Posted March 11 Joe, I've tried to DM you a few times about purchasing some macros if you still have them available for sale. One specifically would be a macro for room floor elevation in feet for plan view (not inches as Chief provides it). I suck at ruby scripting so I would be interested in what else you have available for macros for sale. Thanks. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted March 12 Author Share Posted March 12 4 hours ago, Seacoast said: Joe, I've tried to DM you a few times about purchasing some macros if you still have them available for sale. One specifically would be a macro for room floor elevation in feet for plan view (not inches as Chief provides it). I suck at ruby scripting so I would be interested in what else you have available for macros for sale. Thanks. Hi Ron, I've been very busy and apologize for not answering PM's. Do you want it for actual elevation? ie: Sea Level or just relative to Floor 1 I have macros that work in decimal feet as well as in ft_in. -Joe Link to comment Share on other sites More sharing options...
Seacoast Posted March 12 Share Posted March 12 Hi Joe, Thank you for your response. No worries, I can relate to being very busy. I was looking for relative to floor 1 in feet and inches. Do you have a list of macros available with prices? You can send me a PM if you would like. Thank you 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