Macro Arguments

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

Macro Arguments

Postby rm0016@uah.edu » Wed Feb 06, 2019 4:41 pm

I am trying to pass in arguments for my macro written in JRuby. The documentation says that the argument will be a global variable for my script.
I created a string argument in the "Arguments" section of the macro editor, set a default value, and selected "Automatically run with default values".

I am not sure how to access the argument from my script though. I tried using ARGV and ALH, but no luck.

Thanks
rm0016@uah.edu
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Wed Feb 06, 2019 4:33 pm

Re: Macro Arguments

Postby rm0016@uah.edu » Thu Feb 07, 2019 9:54 am

Nevermind, figured it out. Just use Ruby global variable access rules, example: $arg_name
rm0016@uah.edu
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Wed Feb 06, 2019 4:33 pm


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 1 guest