Jump to content

Adding CAD Information to header


---
 Share

Recommended Posts

Is there an easy way to add the information found under CAD > CAD File > CAD Information to a report header in PiWeb? Specifically the first row that shows the file path and solid model name. I would like for this to be automatically pulled in using our internal generic template rather than manually filling out a text box, if possible.
Link to comment
Share on other sites

Hi Benjamin,
I can get the model name with the following code. Simply add it as the variable in whatever textbox you want. The file path is a bit trickier. I am not sure that would be possible, but I can certainly poke around a bit more.

${List.IndexOrNull(Qdb.AdditionalData.FileName,List.IndexOf(Qdb.AdditionalData.FileName,"MODEL_NAME_HERE"))}

The only change that you would need to change could be the name of the file that you want to pull up. The way that this works is by looking at the additional data saved to the measurement plan, and grabbing the item with the given name. Notably, when the model is in your measurement plan additional data, it has the .meshmodel file extension, so you'll want to make sure that is included.

Hopefully this works for your purposes.

Best,
Andy Block
Link to comment
Share on other sites

Andy, thanks for the response. I tried using the code below in a text box and am getting a null result, but I may be using this incorrectly. For examples sake, if I used an STP file named '12345.stp' to create a program, is that what I need to replace "FILE_NAME_HERE" with? Or are you referring to the name of the calypso program? I tried a few iterations of each and only got a null result.
Link to comment
Share on other sites

  • 2 weeks later...
The info you are looking to add is not contained within the inspection and is technically a separate data set.

If you have PCM this should get you about 95% of the way there...
cadInfoList=readListFile(getActualInspectionDir()+"\cadinfo")
cadFilePath = getParameterNamed(cadInfoList.asArray,1)
cadFileType = getParameterNamed(cadInfoList.asArray,2)
cadFileVersion = getParameterNamed(cadInfoList.asArray,3)
cadFileChangeDate = getParameterNamed(cadInfoList.asArray,4)
Standard PCM disclaimer applies. Use at your own risk.
Link to comment
Share on other sites

 Share

×
×
  • Create New...