Can This Be Done With Macros?


jbaehmer
 Share

Recommended Posts

I have been trying to research this, but I think it just may be way over my head as I am trying to understand the Ruby Language.

 

I am using this macro for my window styles

 

type_code.gsub(/RS/,'XO')

 

Can I make it so that I can show something different for each window style within the single macro?

Link to comment
Share on other sites

I have been trying to research this, but I think it just may be way over my head as I am trying to understand the Ruby Language.

 

I am using this macro for my window styles

 

type_code.gsub(/RS/,'XO')

 

Can I make it so that I can show something different for each window style within the single macro?

Yes, but you need to do something like:

 

x=""

if type_code == "RS"

   x = "XO"

elsif type_code == "LS"

   x = "OX"

elsif type_code == "TS"

   x = "OXO"

else

   x = "X"

end

x

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share