Syntax Error in Template, MotionView
I have problems with templates in MotionView tutorials:
Tutorials/Rigid Body Dynamics/MV-1011 and MV-1051.
MotionView reports the following error: "Syntax error in expression:...<!--Deactivate the extension motion first -->......Templex error evaluating text under Model-Template. [General]".
I just copy and paste the script for the template written in the tutorials and change the varname for the model.
{<!--Deactivate the extension motion first -->
<Deactivate
element_type = "MOTION"
element_id = "{the_model.mot_ext.idstring}"
/>}
I have changed "MODEL" to "the_model". I have tried several things but nothing seems to work.
Best Answer
-
Hello Davide -
I see additional {} paranthesis (curly braces), one at the beginning and one at the end, that is giving the error. I have highlighted it in red below
{<!--Deactivate the extension motion first -->
<Deactivate
element_type = "MOTION"
element_id = "{the_model.mot_ext.idstring}"
/>}When adding a template you'll see a {} already put in. If you are copy-pasting, you may remove this set of curly braces. That should fix the error.
regards
praful
1
Answers
-
Hello Davide -
I see additional {} paranthesis (curly braces), one at the beginning and one at the end, that is giving the error. I have highlighted it in red below
{<!--Deactivate the extension motion first -->
<Deactivate
element_type = "MOTION"
element_id = "{the_model.mot_ext.idstring}"
/>}When adding a template you'll see a {} already put in. If you are copy-pasting, you may remove this set of curly braces. That should fix the error.
regards
praful
1 -
Praful Prabhu_20784 said:
Hello Davide -
I see additional {} paranthesis (curly braces), one at the beginning and one at the end, that is giving the error. I have highlighted it in red below
{<!--Deactivate the extension motion first -->
<Deactivate
element_type = "MOTION"
element_id = "{the_model.mot_ext.idstring}"
/>}When adding a template you'll see a {} already put in. If you are copy-pasting, you may remove this set of curly braces. That should fix the error.
regards
praful
There are no erros without the curly braces.
So when I add a Template, I have to delete {} and type:
<!--Deactivate the extension motion first -->
<Deactivate
element_type = "MOTION"
element_id = "{the_model.mot_ext.idstring}"
/>0 -
Davide_21943 said:
There are no erros without the curly braces.
So when I add a Template, I have to delete {} and type:
<!--Deactivate the extension motion first -->
<Deactivate
element_type = "MOTION"
element_id = "{the_model.mot_ext.idstring}"
/>That is correct. The text within the curly braces are processed through a math processor within HyperWorks called Templex. In your case, the first level of braces were sending all the text to the processor and it could not evaluate the expression unlike for the expression {the_model.mot_ext.idstring}, which the templex can find and resolve it.
Regards
praful
0