Community Tip - You can change your system assigned username to something more personal in your community settings. X
I want to create a curve from datum points. To do this, I have imported the datum points offset as a table and created the curve that way. Now I want to automate this process so that I can re-import the points every time I need them and update the curve automatically. Is it possible to import the points table using PRO/Program?
Solved! Go to Solution.
@liz68 wrote:
Hello Martin,
thanks for your answer.
This looks similar to mapkeys. Unfortunately I am not really familiar with using trails.
How can I create one for my case?
Hi,
if you have "zero" experience with trail file then it would be better not use it. FYI ... when you start Creo session and do some work in it then almost every action is recorded into trail file. Its name is trail.txt.n by default. When you finish Creo session, you can rename the file and edit its contents. Later you can replay resulting file in next Creo session. This enables you repeat recorded actions.
I think if you search community web, you will find more information concerning trail files.
Maybe it will be enough if you write a procedure How to update the set of points into Word document and use this document, when you need it:
Q: Why you need to automate the process of editing datum point definition?
Pro/Program is not the best approach to automate the import of data. I am not sure if it is even possible with Pro/Program.
If you structure the design intent of your model in a way that regenerates when importing new point data then you could use one of the API (Toolkit, J-Link etc.) to read in data but unless that is a function call in the context of a larger program, I don't see how it saves you any time when modeling.
You could create a mapkey to read in the points file and regenerate the model. This would enable updating the points with a button push. A mapkey would be my suggestion to deal with this.
Thanks tbraxton for your reply.
I was thinking the same thing, but I was hoping it might work somehow with PRO/Program.
Hi,
I tested trail method successfully.
Situation no.1
!
! DATUM POINT ARRAY DATA FILE
!
! Comment lines should begin with an exclamation mark (!).
! You may have as many comment lines as you wish.
! There must be at least one space between values.
!
! Enter values with respect to datum arrays' coordinate system:
!
!CARTESIAN coordinates:
! X Y Z
!
0.00 0.00 0.00
10.00 10.00 0.00
20.00 100.00 0.00
Situation no.2
!
! DATUM POINT ARRAY DATA FILE
!
! Comment lines should begin with an exclamation mark (!).
! You may have as many comment lines as you wish.
! There must be at least one space between values.
!
! Enter values with respect to datum arrays' coordinate system:
!
!CARTESIAN coordinates:
! X Y Z
!
0.00 0.00 0.00
10.00 10.00 0.00
20.00 100.00 0.00
30.00 30.00 0.00
To be able to do this change, following trail file has to be generated and replayed.
Note: Below shown trail file works for my part, only.
!trail file version No. 1961
!Creo TM 7.0 (c) 2023 by PTC Inc. All Rights Reserved.
~ Select `main_dlg_cur` `PHTLeft.AssyTree` 1 `node3`
!Datum Point id 40
~ Command `ProCmdRedefine@PopupMenuTree`
!ODUI session starting: Okit widgets are on, Undo/Redo on, Dashboard style off, Tab style on. Feature title : Datum Point
!ODUI session started.
!%CPSelect coordinate system to place points.
~ Activate `Odui_Dlg_00` `t1.UpdateBtn`
!results of editing PRT_CSYS_DEF.pts.1
@ edit
^!
^! DATUM POINT ARRAY DATA FILE
^!
^! Comment lines should begin with an exclamation mark (!).
^! You may have as many comment lines as you wish.
^! There must be at least one space between values.
^!
^! Enter values with respect to datum arrays' coordinate system:
^!
^!CARTESIAN coordinates:
^! X Y Z
^!
^ 0.00 0.00 0.00
^ 10.00 10.00 0.00
^ 20.00 100.00 0.00
^ 30.00 30.00 0.00
@ endedit
!%CPSelect coordinate system to place points.
~ Trigger `Odui_Dlg_00` `t1.CSysCollectorTbl` 2 `0` `c1`
~ Trigger `Odui_Dlg_00` `t1.CSysCollectorTbl` 2 `` ``
~ Move `Odui_Dlg_00` `Odui_Dlg_00` 2 28.957465 3.246038
~ Activate `Odui_Dlg_00` `stdbtn_1`
!ODUI session finished.
!ProgressBarDlg: Regen Started
Creo 7.0 model attached.
Hello Martin,
thanks for your answer.
This looks similar to mapkeys. Unfortunately I am not really familiar with using trails.
How can I create one for my case?
@liz68 wrote:
Hello Martin,
thanks for your answer.
This looks similar to mapkeys. Unfortunately I am not really familiar with using trails.
How can I create one for my case?
Hi,
if you have "zero" experience with trail file then it would be better not use it. FYI ... when you start Creo session and do some work in it then almost every action is recorded into trail file. Its name is trail.txt.n by default. When you finish Creo session, you can rename the file and edit its contents. Later you can replay resulting file in next Creo session. This enables you repeat recorded actions.
I think if you search community web, you will find more information concerning trail files.
Maybe it will be enough if you write a procedure How to update the set of points into Word document and use this document, when you need it:
Q: Why you need to automate the process of editing datum point definition?
Hi,
thanks for the short explanation.
I will try to find a solution with mapkeys. If that doesn't work, I guess the best option is to write the procedure as you suggested.
A: I am working on a project where we want to parameterize and automate a 3D design (I am not allowed to give more details). For this purpose I am working with PRO/Program and mapkeys and the curve is used for the geometry of a part. CREOSON was thought as alterntiv but unfortunately was not approved by our IT.