Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hey, I wanted to know the name of the programming language which is used in CREO (the language to create macros..).
I only found this message on the internet : https://community.ptc.com/t5/System-Administration/In-what-programming-language-is-PTC-Creo-Parametric-written-in/m-p/536946#M19492.
Solved! Go to Solution.
You can edit this "code" in a text editor and some users do this, The syntax is specific to Creo Parametric as far as I know. I will warn you that it is not documented by PTC so it will involve much effort to develop it without using the record function. I am among a small group of users that would like to see PTC document the syntax but to date they have not been willing to do this. Also take not that fundamental programming concepts such as looping, search, etc. are not supported for map keys.
Check out these threads for some more tips:
https://community.ptc.com/t5/System-Administration/Mapkey-Writing-Editing-Tips/m-p/443729
No API (programming language) is required to create macros. PTC refers to them as map keys and they can be recorded directly using the UI,
Refer to this link to get started.
There is support for Visual Basic, Java, and C in Creo that can be used to create macros but are not necessary.
Right we can use the recording tool but what if we want to modify directly the config.pro file, like this code below.
mapkey 2nss @MAPKEY_LABELNo specific status V2;\ mapkey(continued) ~ Command `ProCmdViewVisTool` ;\ mapkey(continued) ~ Arm `visual_dlg0` `Table` 2 `default` `name_column`;\ mapkey(continued) ~ Select `visual_dlg0` `Table` 2 `default` `name_column`;\ mapkey(continued) ~ Activate `visual_dlg0` `PropertiesBtn`;\ mapkey(continued) ~ Select `visual_dlg0` `ExtLay.ItemRefList` 1 `-1:69:[40]`;\ mapkey(continued) ~ Activate `visual_dlg0` `ExtLay.RemoveOperationButton`;\ mapkey(continued) ~ Close `visual_dlg0` `visual_dlg0`;
Is this a programming language only used for PTC ?
You can edit this "code" in a text editor and some users do this, The syntax is specific to Creo Parametric as far as I know. I will warn you that it is not documented by PTC so it will involve much effort to develop it without using the record function. I am among a small group of users that would like to see PTC document the syntax but to date they have not been willing to do this. Also take not that fundamental programming concepts such as looping, search, etc. are not supported for map keys.
Check out these threads for some more tips:
https://community.ptc.com/t5/System-Administration/Mapkey-Writing-Editing-Tips/m-p/443729
Thank you for your response !
If you do want to use a text editor to manage Creo config files I would suggest using Notepad++ and installing the custom Creo language definitions created by @DomenicLaritz.
The Language definitions can be found here:
https://github.com/DonChunior/Creo-Configuration-Files
Thread here:
I'm indeed using Notepad++, I will check out this custom Creo language definitions, thx.
To add to @tbraxton accurate reply, the mapkey syntax is indeed undocumented.
It is a script, more than a language, generated by Creo in order to be re-used by Creo. It collects commands as outputs and as such it does not offer programming instructions (conditions, loops, etc).
Practices amongst CAD admins have proven that some tweaking is possible (combining texts, replacing value here and there) and tolerated by Creo.
The risks of creating a mapkey with a text editor and then input it in Creo are many (transtyping, encoding); that's why mapkeys generated by Creo are exclusively supported.
Inversely PTC cannot be held accountable for mapkeys not created by Creo (a text editor for example).