Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: dkoger on February 01, 2019, 11:03:16 pm
-
We have a set of custom macros that process our modeling stack. We can reverse engineer, create logical and then conceptual models modify the models as needed and then push the changes back down the stack. This is great except at the physical to logical level. When we have a numeric I need to make a datatype choice based on precision in order to apply our custom datatypes for our Azure models.
Code snippet:
%elseIf attType=="numeric" and attTag:"precision"=="18"%
type="Metric"
%elseIf attType=="bigint"%
type="PrimaryKey"
%elseIf attType=="nvarchar" and attLength="25"%
type="RowSource"
%elseIf attType=="nvarchar" and attLength="50"%
type="AK%sl%BK"
%elseIf attType=="numeric"and attTag:"precision"=="24"%
type="Exchange Rate"
%endIf%
I assume I am not using the right method for calling out precision. If I remove the numerics, it processes correctly. If I leave them in it does not process anything.
-
Fixed - needed to use attLength for the precision