Skip to main content
Apr 4, 2018 1:24 PM UTC
Solved

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.

    BenLoosliAnswer
    Apr 4, 2018 2:51 PM UTC

    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

    BenLoosliAnswer
    Apr 4, 2018 2:51 PM UTC

    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.

     

    fbonAuthor
    May 23, 2018 8:56 AM UTC

    Thanks for your answers.

     

    The code is operational for my application.

     

    Solved message.

     

    FAB.

     

     

    May 23, 2018 11:29 AM UTC

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