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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

wfcTexture::GetFilePath not returning full path

RS_10561107
3-Newcomer

wfcTexture::GetFilePath not returning full path

wfcTexture::GetFilePath from the Creo 8 object toolkit returns only the file name, not the full path to the image file.  Is there any way to get the actual full file path for the texture image via the object toolkit?

 

3 REPLIES 3
FV
17-Peridot
17-Peridot
(To:RS_10561107)

  • get config.pro option 'texture_search_path'
  • get current working directory 
  • get CREO_COMMON_FILES environment variable in the current session context and append 'graphic-library/textures'

construct std::filesystem::path with those directory names and a given file name.

use std::filesystem::exists( ...) to check for the existence of the file.

you may end up traversing 'textures' subdirectories for the file...

RS_10561107
3-Newcomer
(To:FV)

Thanks, I am doing something similar as a workaround, scraping the creo common files for images and also scraping the part or assembly folder for images, but it would be much easier for everyone if the object toolkit returned the actual full path

FV
17-Peridot
17-Peridot
(To:RS_10561107)

PRO_PATH_SIZE - _MAX_PATH = overflow

 

Announcements


Top Tags