Problem
The last version of a baseline shall be retrieved as String
Approach
With the usage of the standard methods, the string can be returned
- Baseline=getMostRecentBaseline(Module) – Holt die letzte BL
- bool=baselineExists(Module,Baseline) – Existiert die BL?
- string=major(Baseline) – Versionsnummer VOR Komma
- string=minor(Baseline) – Versionsnummer NACH Komma
- string=suffix(Baseline) – Anhängsel sichtbar in BL Liste
- string=dateOf(Baseline) – Datum der Baseline
- string=annotation(Baseline) – Bemerkung zur Baseline
The version can be retrieved as string.
Solution
string getLastBaselineVersionString(Module ModRef) { string myBase="N/A;" Baseline b = getMostRecentBaseline(ModRef); if (b != null && baselineExists(ModRef,b)); { myBase = (major b) "." (minor b) ""; if ((suffix b) != "") { myBase = myBase "(" (suffix b) ")"; } myBase = myBase " //" dateOf(b) ""; if ((annotation b) != "") { myBase = myBase " " (annotation b) ""; } } return myBase }
I need to create a Dxl script, that script needs to create baseline for a module. Can you give me some suggestions please?