Thank you Sergio but I cannot get your solution to work. Please see the Minimal Working Example (MWE)
comp = {"world" \[Element] "Modelica.Mechanics.MultiBody.World",
"transf" \[Element] "Modelica.Mechanics.MultiBody.Parts.FixedRotation",
"box" \[Element] "Modelica.Mechanics.MultiBody.Parts.BodyShape"};
conn = {"world.frame_b" \[DirectedEdge] "transf.frame_a",
"transf.frame_b" \[DirectedEdge] "box.frame_a"};
mdlName = "TestIt";
ConnectSystemModelComponents[mdlName, comp, conn]
SetSystemModel[
mdlName, <|
"ParameterValues" -> {"transf.rotationType" ->
QuantityVariable[
"Modelica.Mechanics.MultiBody.Types.RotationTypes.
PlanarRotationSequence", IndependentPhysicalQuantity[""]]}|>];
This MWE gives the following error:
SystemModel::irl: The list of rules is not on the form {"variable" -> numericValue, ...}.
If my syntax is correct then there might be some unexpected behavior from SetSystemModel for enumeration types. I wonder if it's a bug that I should report.
To make progress on my project I have worked around the problem like so: after all model parameters are set: 1) assign the "Modelica.Mechanics.MultiBody.Types.RotationTypes.
PlanarRotationSequence" string to all rotationType parameters, 2) extract the ModelicaString of the model; 3) find the string position of all rotationType; 4) remove the enclosing double quotes " and 5) save the ModelicaString to a text file of extension type .mo. It ain't pretty but it gets the job done.
If it's of any help I am using Matematica 12.1.0.0 and SystemModeler 12.2.0, build 8. I cannot update to Mathematica 12.2 because it has other bugs that crash other notebooks.
B