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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Inserer le nom d'un createur sur mise en plan

fbon
4-Participant

Inserer le nom d'un createur sur mise en plan

Bonjour,

Je suis à la recherche d'un moyen pour ajouter dans une table d'une mise en plan, le nom du créateur d'un fichier Part ou Asm via un paramètre.

Actuellement il existe ceci - PTC_WM_CREATED_BY qui me renseigne bien une valeur du style : Bon, Fabrice (fbon: MGPI).

 

Je ne veux afficher que le début avant la virgule de cette valeur dans une table.

Une idée de comment faire cela? Je précise que l'on fait la chasse aux relations nos modèles n'en n'ont aucunes.

ACCEPTED SOLUTION

Accepted Solutions
BenLoosli
23-Emerald II
(To:fbon)

You will need to use relations in your drawing or part/assembly file that will search the ptc_wm_created_by string for the first comma and then extract the portion of the string up to the comma position.

 

comma_pos = search(ptc_wm_created_by,',')

short_created = extract(ptc_wm_created_by, 1,comma_pos-1)

 

You will need to experiment with the relation code, as my example has not been tested.

 

View solution in original post

3 REPLIES 3
BenLoosli
23-Emerald II
(To:fbon)

You will need to use relations in your drawing or part/assembly file that will search the ptc_wm_created_by string for the first comma and then extract the portion of the string up to the comma position.

 

comma_pos = search(ptc_wm_created_by,',')

short_created = extract(ptc_wm_created_by, 1,comma_pos-1)

 

You will need to experiment with the relation code, as my example has not been tested.

 

fbon
4-Participant
(To:BenLoosli)

Thanks for your answers.

 

The code is operational for my application.

 

Solved message.

 

FAB.

 

 

StephenW
23-Emerald III
(To:fbon)

Please use the "Accept as Solution" button on Ben's post.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags