Finding reason for NX prt file error on import

Hello,

I have an NX .prt file that has 2 additional prt files. When I import the top file using A3DAsmModelFileLoadFromFile, the return result is code is A3D_LOAD_MISSING_COMPONENTS. On the model info, I get three error messages in ‘OpenFile: file open’ while at the bottom the reason type for the fail says “Coordinate System (45)”. I am trying to determine what the actual error or cause of the error might be.

Thanks for any info.

Here is the model info:

Unigraphics ™ file reader.
Reading data from file : C:\test\Subassy\D…1.prt

Error ‘OpenFile: file open’ loading part %UGMGR=V3.2 PH=… PRH=… PN=M…C PRN=- RT=“has shape” AT=“UG master part file” /%UL=V1.0 PH=…
Error ‘OpenFile: file open’ loading part %UGMGR=V3.2 PH=… PRH=… PN=D…1 PRN=- RT=“has shape” AT=“UG master part file” /%UL=V1.0 PH=…
Error ‘OpenFile: file open’ loading part %UGMGR=V3.2 PH=… PRH=… PN=M…A PRN=- RT=“has shape” AT=“UG master part file” /%UL=V1.0 PH=…


---------- Reader options --------------------------------------

---- General read options ------------------------

Reading Mode : Brep

---- Standard read options ------------------------

Solids : Yes
Surfaces : Yes
Wireframes : Yes
3D PMI : Yes
Hidden objects : No
Construction & References : No
Active Filter : Yes
Attributes : No
---- Specific read options ------------------------

Drawing reading : No

---- General assembly read options ------------------------

Load product structure only : No

Search directories
Directory : C:\test\Subassy
Recursive search : Yes

Preferred Reference Sets:
List:
As Saved
Entire Part
Empty
Apply to All Levels: No
Fit All to Update View Cameras: Yes


---------- File Information --------------------------------------

Model name : D…1
Version/Release : NX 2206 Series
Unit (multiple of mm) : 25.4


---------- Reading phase --------------------------------------


---------- Summary --------------------------------------

Details:

OUT OF FILTER SUCCESS FAIL NOT TREATED TYPE
0 0 1 0 Coordinate system (45)

     0               0               1               0        TOTAL

Standard:

       TO BE PROCESSED        |   FAIL  |         CREATED                 

| 1 Coordinate system | 1 | |

     1                        |    1    |       0 TOTAL

Hello @jeff.walrath
A3D_LOAD_MISSING_COMPONENTS is returned if the load is partially complete. However this does not affect HOOPS loading other subparts. If you are looking at our examples (e.g. PRC2XML), HOOPS will generally continue the process.
Regarding the message “Error in ‘OpenFile: File Open’”, it means that HOOPS cannot open the specific file. However I can’t tell you more if I don’t have the original CAD file to analyze. Thank you.

Best Regards,
Man

Man,

Thank you - very useful information. Is there any possible way with the existing API to have it discover/print the name of the file that it is trying to find (e.g. the actual file name that it is seeking)? These CAD files were obtained from a customer and there are potential issues with file path modifications during the process of transferring files to us.

Thanks.

-jeff

Hello Jeff,
You can call A3DAsmGetFilesPathFromModelFile (link). Or you can refer to the example PRC2XML (PRC2XML.cpp).

Man

Man,

Thank you so much for the pointers/links.

Unfortunately, I cannot disclose the models from the customer so I must just convey what I have. There are 3 PRT files and all are in the same directory. One is the top and then the other 2 should be referenced from the top. They are named as follows:

… pic removed due to customer requirements …

The D…1.prt file is the top part, and then the other 2 are supporting. The print out doesn’t show a missing path/file name. If I look at the the message, it says PN=D…1 and PN=M…A are missing but those 2 files are in the directory.

Is it possible that the customer did NOT enable some flag or feature that produces some field that the Exchange importer is expecting?

I implemented that function call you provided and here is my print outs:

Warning: The following files are the loaded ASSEMBLY files and paths for the model:
Warning: Q:\test\Subassy\D…1.prt
Warning:
Warning: The following files are missing files that were not loaded for the model:
Warning: %UGMGR=V3.2 PH=abc124 PRH=xxxx4321 PN=D…1 PRN=- RT=“has shape” AT=“UG master part file” %UL=V1.0 PH=xxx1234
Warning: %UGMGR=V3.2 PH=qwe4321 PRH=xxxx9876 PN=M…A PRN=- RT=“has shape” AT=“UG master part file” %UL=V1.0 PH=xxxx5678
Warning:

Thanks

-jeff

Hello Jeff,
You can create a support ticket through our support portal (link) so that these files are not viewed by this public forum. And we are used to work with confidential data from many companies and can offer to sign a non-disclosure agreement (NDA) if needed.
In any case, the first step is to verify the top assembly to the native software (NX application). If the NX application does not report any errors/warnings, this may be a HOOPS issue. In the end we still needed the CAD files to fix the issue. Thank you.

Best Regards,
Man

Man,

First off, let me thank you so much for all your help. Also, let me apologize for going on this wild goose chase. In short, it appears to be a faulty file.

Per your suggestions of testing the NX file in another tool, it in fact showed that the model uses links to a 3rd party tool. Thus, those file names are NOT actual file names. That is why when I printed the file names for the part files, they look so strange.

Thanks again for all the help. I am really enjoying working in the HOOPS Exchange and Communicator environments. Very nice.

-jeff

1 Like