Skip to main content
10-Marble
April 20, 2023
Question

How to add floating license by Toolkit or Object Toolkit?

  • April 20, 2023
  • 1 reply
  • 1118 views

I need to add a floating license during the running of the TOOLKIT program, because this license must be used during the running process, and the addition of this floating license will be canceled at the end of the running. Does anyone know how to do this? MACRO cannot be used. PTC does not seem to provide such a method or function in the toolkit and object toolkit. If anyone knows, please let me know, thank you.
If there is really no such method, ask PTC to add the function of adding and canceling floating licenses to the API

 

license.png

 

 

1 reply

18-Opal
May 4, 2023

You can do it the other round, by validate that the option is available.

 

extern ProError ProOptionOrderedVerify ( ProCharName option,
 ProBoolean* p_option_exist );
/*
 Purpose: Determines whether the specified option is available, such as 
 Pro/MESH.

 Input Arguments:
 option - The option name.

 Output Arguments:
 p_option_exist - This is PRO_B_TRUE if the option is available.
 Otherwise, this is PRO_B_FALSE. 

 Return Values:

 PRO_TK_NO_ERROR - The function successfully returned the 
 information.
 PRO_TK_BAD_INPUTS - The specified option is invalid.
 PRO_TK_E_NOT_FOUND - The specified option was not found.
*/