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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Extract information from a parameter in schematics

jfransson
13-Aquamarine

Extract information from a parameter in schematics

Hi.
I'm currently struggling with with a use case in Creo Schematics that hopefully a more experienced user can help me with.

 

I want to extract part of the fiber name into a new parameter of the fiber (e.g. Signal).

Let me explain: If the fiber uses the name format W## (Name e.g. W03) then I want to calculate the value of another parameter that calculate and extracts the number from the name.

 

Example 1:

Name = W03

Signal = 03 (calculated = yes)

 

Example 2:

Name = W10

Signal = 10 (calculated = yes)

 

I'm not sure if this makes any sense.

I assume that Java needs to be involved somehow but thats not my area och expertise.

 

BR Jonas Fransson

2 REPLIES 2
NeilM
12-Amethyst
(To:jfransson)

I'd take a look at the ArtifactName.slice function. It's an existing java function available in Creo Schematics and lets you slice part of the name either from a character or for a number of characters from the start/end.

jfransson
13-Aquamarine
(To:NeilM)

Thank you very much.

I might be wrong but from what I understand when I read about this the function is only available for labels? I need a parameter to use a similar function as {ArtifactName.slice(2,3)} or {ArtifactName.slice(-02)} but is must be a part of the name in order to be correctly reported to Creo Parametric.

Announcements


Top Tags