Possible to script insert of OLE object Excel file in Creo drawing?
I'm trying to create a mapkey to insert an Excel file in a Creo 2.0 drawing using the insert, object function (OLE). The problem is it stalls as soon as the Insert Object interface comes up. Trying to capture it within and run a trail file does the same thing (trail file stops at the same place & doesn't capture the inputs into the Insert Object box). I also tried accomplishing this by creating a source drawing with the Excel OLE object already inserted and using a mapkey to open that drawing, copy the OLE object and paste it into the destination drawing. This works, but with a major catch. Within a session, any drawings to which the OLE object is pasted are actually linked in the background such that changing the OLE inserted excel table in one drawing applies the same change to the table in all the drawings.
Anyone have any suggestions on scripting the insert object function?
Overall goal is to have a table on a drawing that autonumbers the rows as they are added, has a "CC" code box which is limited to the numbers 1-5, ideally with a pick dropdown for the users, and a text reason code which has an association to the CC code . . e.g. CC #1 = Reason text AAA, CC #2 = Reason text BBB etc I want to eliminate the reason from being typed in ( make it a fixed list) to prevent typos and personal takes on the wording, and have an association between the CC code and reason text to prevent mismatches. I did all this in the Excel file, works great, but want to package the insert of the Excel file OLE object down to a button click for the user.

Regards,
Erik Gifford
GW Lisk Co., Inc.
Creo Parametric 2.0 M190
Windchill PDMLink 10.0 M030
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

