Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
When I learn about restricted parameters, I notice that there is no showcase about how to correctly add <quantity type> and <unit>. I have attempted to create some files but they are not accepted by Creo.
Can anyone give me some examples about adding quantity type/unit?
Solved! Go to Solution.
@Luc_G wrote:
Hi,
Below is my new attempt but failed to be read by Creo.
When I delete "Length" & "mm" it is read by the system but when I update my exsisting parameter DD1 it says wrong type or unit.
Hi,
every Enum value must be followed by mm.
Hi,
please ask PTC Support and let us know.
Hello @Luc_G
Before creating the restricted parameter file, just create a simple parameter from the User Interface, Right click on it, and select Insert Unit.
After that, you will see the Quantiy and the Unit syntax expected in the restricted parameter file definition.
For instance, if you insert "kg" as "unit" from drop down list, you'll see that unit will be kg (without surporise), and Quantity is Mass:
Once having acknowledged this information, build your restricted parameter file using syntax according to guidance from article 123992.
Hope this helps,
Regards,
Serge
Additional note ...
This definition is correct ... the value contains the decimal point and the decimal part of the number
{
Name = MASS_KG
Type = real Mass
Default = 0.0 kg
}
This definition is not correct ... the value does not contain the decimal point and the decimal part of the number
{
Name = MASS_KG
Type = real Mass
Default = 0 kg
}
Hi,
Below is my new attempt but failed to be read by Creo.
When I delete "Length" & "mm" it is read by the system but when I update my exsisting parameter DD1 it says wrong type or unit.
@Luc_G wrote:
Hi,
Below is my new attempt but failed to be read by Creo.
When I delete "Length" & "mm" it is read by the system but when I update my exsisting parameter DD1 it says wrong type or unit.
Hi,
every Enum value must be followed by mm.
Thanks a lot! Now it works, finally.
Hello @MartinHanak => Thanks a lot for this extra guidance!
Hello @Luc_G => Thanks a lot to have confirmed effectiveness of this suggestion!
Just for info, I cared this morning about updating article 123992 (shared earlier in this post), documenting now the expected syntac for the Enum list in the scope of "parameters with unit" requirement in restricted parameter definition file (with the hope this will avoid confusion for other customers/peers/partners who may face the same issue in the future).
Regards,
Serge
Hi,
the article contains a bug ...
Enum={0.0 kg,5.0 kg,10.0 kg,15 kg}
Correct version
Enum={0.0 kg, 5.0 kg, 10.0 kg, 15.0 kg}