[Be...] Posted November 1, 2023 Share Posted November 1, 2023 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 More sharing options...
[An...] Posted November 1, 2023 Share Posted November 1, 2023 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 More sharing options...
[Be...] Posted November 2, 2023 Author Share Posted November 2, 2023 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 More sharing options...
[Je...] Posted November 13, 2023 Share Posted November 13, 2023 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in