Hello Jesus!
Thank you for reporting this. The syntax error arises since "if" is a reserved keyword in Modelica, denoting if-statements. Thus you cannot have variables named "if" (or other reserved keywords). The easiest work-around is to use another name for your variable. The code below, where I renamed "if", "x" should work.
APF = WSMCreateModel[
"APFModel", {Derivative[1][x][t] == -0.055555555555 x[t] -
55.55555555555556 swt[t] vc[t] - 55.55555555555556 Vs[t],
Derivative[1][vc][t] == 1000 x[t] swt[t]},
t, {swt[t] \[Element] "Modelica.Blocks.Interfaces.RealInput",
Vs[t] \[Element] "Modelica.Blocks.Interfaces.RealInput",
x[t] \[Element] "Modelica.Blocks.Interfaces.RealOutput",
vc[t] \[Element] "Modelica.Blocks.Interfaces.RealOutput"}]
Regards, Patrik