cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Translate the entire conversation x

get Common File location using Toolkit API

Praveen2
10-Marble

get Common File location using Toolkit API

I am using Creo Parametric Release 10.0 and Datecode10.0.3.0
I want to get the tolerance table files which are inside “<Creo Common Files>\tol_tables\iso"


How to get Creo Common File location using PTC pro Toolkit API?

3 REPLIES 3

Hi @Praveen2 

 

Thank you for your question! 

 

I’d like to recommend to bring more details and context to your initial inquiry. For example:

  • Can you describe the steps you have taken so far to use the Toolkit API for retrieving the common file location?

Please add screenshot(s) to better understand what you are trying to do in your process. 

 

Please refer to this guideline to make your questions more likely to receive a quick and useful answer. 

This will increase your chances to receive meaningful help from other Community members. 

 

What is a good question? 

Creo

 

Thank you for your participation and please let me know if you need further assistance! 

 

Best regards,


Catalina
PTC Community Moderator
PTC
MichaelW
17-Peridot
(To:Praveen2)

To get Creo Parametric built in environment variable CREO_COMMON_FILES (only available from current Creo session):

  1. Home > Utilities > Open System Window
  2. Type: set CREO_COMMON_FILES <Enter>
    • Example: CREO_COMMON_FILES=C:\Program Files\PTC\Creo 10.0.3.0\Common Files
  3. Type: ​​​​​​​Exit <Enter> to return to Creo

Details and other workarounds (Windows Registry, Creo support.inf, Session Environment Variable)

  • CS440311 How to obtain the Creo "Common Files" folder location in Creo Parametric

 

Application through Creo Toolkit:

  • For the above technique based on Environment Variables, there is no Toolkit API supported.
  • Use generic C code instead: getenv()
  • Details: CS429062 How to get/read or set/write a Windows environment variable through Toolkit in Creo Parametric
RPN
17-Peridot
17-Peridot
(To:Praveen2)

Using Common File is probably not a good idea, I don‘t the exact option name but you can get the path if you read the config option in session .

 

ProError ProConfigoptSet (ProName option,
ProPath option_value );

and

ProError ProConfigoptionGet (ProName option,
ProPath option_value );

ProConfigoptArrayGet (ProName option, ProPath** value_array);
/*

Purpose: Retrieves the current value for the specified configuration file
option. This function supports multi-string options
(e.g. search_path). Note: Use this function instead of
ProConfigoptGet() while retrieving the value of an option that may
have multiple values or a path-length string.

 


I‘m sure that there is an option where you can read the tolerance folder from.

Announcements

Top Tags