cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to add units to restricted parameters?

Luc_G
5-Regular Member

How to add units to restricted parameters?

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?

Snipaste_2022-01-21_14-09-24.pngSnipaste_2022-01-21_13-38-16.png

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
MartinHanak
24-Ruby III
(To:Luc_G)


@Luc_G wrote:

Hi,

Below is my new attempt but failed to be read by Creo. 
Snipaste_2022-01-24_08-51-26.png

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.


Martin Hanák

View solution in original post

9 REPLIES 9
MartinHanak
24-Ruby III
(To:Luc_G)

Hi,

please ask PTC Support and let us know.


Martin Hanák

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:

sacquarone_0-1642762058219.png

 

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
}

 


Martin Hanák
Luc_G
5-Regular Member
(To:MartinHanak)

Hi,

Below is my new attempt but failed to be read by Creo. 
Snipaste_2022-01-24_08-51-26.png

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.

MartinHanak
24-Ruby III
(To:Luc_G)


@Luc_G wrote:

Hi,

Below is my new attempt but failed to be read by Creo. 
Snipaste_2022-01-24_08-51-26.png

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.


Martin Hanák
Luc_G
5-Regular Member
(To:MartinHanak)

Thanks a lot! Now it works, finally.

sacquarone
20-Turquoise
(To:Luc_G)

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}

 


Martin Hanák

Thank you @MartinHanak !!

Article 123992 updated accordingly

Regards,

Serge

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags