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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

wfcTexture::GetFilePath not returning full path

RS_10561107
3-Visitor

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-Visitor
(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

 

Top Tags