Creo Drawing Text Into PDMLink Attribute

Automating Table Cell Text Into a Parameter Value

Goal: Populate a PDMLink attribute value with a text string from a Creo drawing table cell.

This will examine and demonstrate how to utilize Creo mapkeys, trail files and batch files to retrieve the latest table cell text (alpha and numeric) string based upon its position in the table. Then create a new drawing parameter and paste the text string into the newly created drawing parameter value and designate it.

The solution will find the latest CR Log Number and paste the value into a newly created Creo drawing parameter.  (2nd row – 2nd column “15-00125-25  02-14-15  CDE”)

07_CRLOG_TABLE

Newly created parameter “CR_LOG_NUMBER” with cell text string pasted into the value and designated.
07_CRLOG_PARAM

If you have one or two drawings the easiest method is to open your drawing and copy (ctrl+c) the desired text and then open your parameters and paste (ctrl+v)the text into the value.  Done.  However if you are dealing with hundreds or thousands of drawings then the following method can either be incorporated into a master import file or used as a stand alone mapkey that will accomplish the task in a split second ensuring accuracy while saving precious time.

Let’s Begin

Start a New Session of Creo and open the drawing.

Mapkey | Trailfile Start:

Zoom Into Area

To ensure my mouse picks are accurate when I pick the table cells, I zoom into the lower left corner of the drawing where the table is located.

Copy and Save Table Cell(s) Strings to Text File(s)

All four table cell text strings, in the column 2 cells, will be copied into four individual text files using the method as described in my YouTube video Mapkeys & Trailfiles.  In this example I will start with the bottom cell and work my way up to the top.07_crlog_cell_4

After I have zoomed in the the area:

Table Tab

Table Cell Filter

Draw a box around the bottom table cell07_crlog_cell_3

Properties

Save

Type entire file path and file name07_crlog_cell_2

Green Check Mark

Cancel….

07_crlog_cell_1

Then move upward and draw a box around the

next cell…

 

save_txt_07_crlog_cell_2_1

…Until all four cells have been saved as a text file.

Cancel | General Filter | Layout Tab | Refit (unZoom)

Exit Creo

Now edit the session trail and create a mapkey to run the play trail file (this will be the master trail file – additional commands will be added.

How to create a Trail File.

How to create a Mapkey to Run a Trailfile.

The next step will be to create the drawing parameter “CR_LOG_NUMBER”.

Start a new session of Creo and open the same drawing as above. Select the following commands:

Tools | Parameters |

check back often as this page is a work in progress…

Leave a comment