Skip to main content
4-Participant
April 4, 2018
Solved

Inserer le nom d'un createur sur mise en plan

  • April 4, 2018
  • 3 replies
  • 2276 views

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.

    Best answer by BenLoosli

    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.

     

    3 replies

    BenLoosli23-Emerald IIIAnswer
    23-Emerald III
    April 4, 2018

    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.

     

    fbon4-ParticipantAuthor
    4-Participant
    May 23, 2018

    Thanks for your answers.

     

    The code is operational for my application.

     

    Solved message.

     

    FAB.

     

     

    StephenW
    23-Emerald III
    May 23, 2018

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