Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hey, I am developing a C++ Toolkit plugin, but I don`t not want to load creotk.dat manually in config.pro or even in Aux Applications. Is their any way to alternative method to do that.
To address properly your request, there is a need to clarify why you need to run an application witout creotk.dat.
What is the purpose of opting for a different route than the official one?
@remy wrote:
To address properly your request, there is a need to clarify why you need to run an application witout creotk.dat.
What is the purpose of opting for a different route than the official one?
my guess the purpose of opting for a different route is that the official route with the exception of option B in Mark's answer requires executing installation scripts with elevated permissions and in case B,C,D,E there is quite high probability that creotk.dat would be misconfigured in case of multiple applications from multiple vendors.
And looking at the original question, you don't have to load creotk.dat at all. Fact is you can load any named.dat file from any location. In the config.pro, you can set PROTKDAT FILELOCATION\NAME.DAT. (Im using Creo3, the Protkdat config.pro setting could be called creotkdat in newer versions).
Anyway the entry in Creo 3 looks like:
PROTKDAT J:\MYTOOLKITSTUFF\MYTK.DAT
All your objections are founded and fair.
Except maybe the part where you think that a start script cannot be set its starting directory. and the fact that the creotk.dat necessarily has to be appended.
I fail to understand exactly your positioning: you are a developer, can you explain why it is such a challenge to get admin rights?
When our customer deploy or migrate their application they work in collaboration with IT and our historic OEMs like 3D connexion have not raised the annoyance that you seem to complain. So unless you use the official route or unless you shed more information on your expectations and your constraints, then we'll poke around blindly.
good luck with that.
@remy wrote:
All your objections are founded and fair.
Except maybe the part where you think that a start script cannot be set its starting directory. and the fact that the creotk.dat necessarily has to be appended.
I fail to understand exactly your positioning: you are a developer, can you explain why it is such a challenge to get admin rights?
When our customer deploy or migrate their application they work in collaboration with IT and our historic OEMs like 3D connexion have not raised the annoyance that you seem to complain. So unless you use the official route or unless you shed more information on your expectations and your constraints, then we'll poke around blindly.
good luck with that.
Hello all,
Regarding startup directory - from an application developer standpoint, when one would like to install a registry file there. ( 'install' means to make a new when nothing there or to alter an existing one with relevant application entries) The main question to be answered is where the startup directory is on a customer's computer.
One way to acquire it is to prompt the end-user during installation process or to provide installation switch to supply startup directory value for the silent install. In case the app developer would like to be nice person and make a the installation process easier for the end user than the app developer has somehow to figure where this startup directory is. The one thing which is known, the startup directory must have 'drive-letter' so it must be on one of the mapped drives but those are a 'dynamic' thing the drive may or may not be mapped during the installation process. What I'm trying to convey is the process is not pretty...
Regarding appending data to protk.dat or creotk.dat - if a user has protk.dat already which starts some other applications and an installation of the new application would have overridden the existing one and a user would start a creo session and the first thing this user would see that the old apps were gone I'm sure that the new app would get a really unpleasant reputation...
Regarding admin rights. There is nothing wrong with that. Here is an edge use case: to provide a preproduction version or 'trail' version of an app - involving IT department in this process may not be the fastest route to get a feedback from the intended users...
Regarding deployment - since Creo 1 or Creo 2, I don't remember exactly when, with 'c:\ProgramData\PTC\...' (option A) the life of sysadmin got unquestionably better. In the old days either a space ball would stop working when some other app was installed or vice versa... The annoyance was loud and clear sometime around 2010 give or take a year or two during multiple pro/toolkit tech committee sessions.
HIH.
maybe a call to ProToolkitDllLoad().
When you read the documentation, it tells that this function calls another application.
This still requires that the calling application be started with a creotk.dat file.
reading the documentation...
Pro/Toolkit, OTK, Web/Link, OTK-Java (J-link) user guides, all of them have 'Task Based Application Libraries' chapter.
start an async app, make it call pfcSession.BaseSession.LoadProToolkitDll(...) or ProToolkitDllLoad(...), exit async app.
Thank you for your clarification. Your reply finally makes sense now if VG needs to use an asynchronous application.
VG_9645254 initially referred to a "plugin" hence implying a synchronous application.
the application is 'plugin' and it is synchronous
the 'loader-application' is asynchronous and has one task which is to call ProToolkitDllLoad().
something like this:
async:
//bar.c
int main(argv, argc)
{
char dll_path = "foo.dll";
ProName app_name = L"Foo";
ProError err = ProEngineerConnect(...);
if( PRO_TK_NO_ERROR == err){
ProToolkitDllLoad(app_name, dll_path, ...);
}
return 0;
}
sync plugin ( foo app):
//foo.c
extern "C" int user_initialize(...)
{
//the actual app
}
if pro/e is up and running, and user starts 'bar.exe' from a shell the 'foo' app should be initialized in pro/e session.
some logic should be applied while attempting to connect to the intended pro/e session if multiple are running and so on...