Showing results for 
Search instead for 
Did you mean: 

Can not open cgm file in Viewer on TC 10.1.5

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

I am maintaining a tc developed by someone else.
I upgraded from tc9 to tc10.1.5 this time.
However, the cgm file does not open after upgrading.
The object_type of the dataset is Image.
It contains a zip file.
The zip file contained several cgm files.




When I click on the viewer, it is still in no response state.



When it is forcibly terminated, the following error message is displayed.







And this is another problem, but I opened the viewer by creating only one cgm file as a test and it looks like this.



Please help me.

Thank you.



Re: Can not open cgm file in Viewer on TC 10.1.5

Gears Phenom Gears Phenom
Gears Phenom

Good afternoon,
I think that the built-in viewer will not show CGM, which are in zip archives.

When I export a CGM from NX, the dataset is created with the type DrawingSheet. And if you right-click on it and select Named Reference ... then it will have a CGM file.

I think that in your dataset in the Named Reference ... there must also be a CGM file.

Re: Can not open cgm file in Viewer on TC 10.1.5

Solution Partner Esteemed Contributor Solution Partner Esteemed Contributor
Solution Partner Esteemed Contributor
@tgun07 the behavior you see is normal. A zip file should be stored in a ZIP dataset and a cgm file stored in a CGM dataset. The dataset (actually the tool) holds the file extension of the object to be opened. If the Viewer doesn't know how to render the object then it will show the properties page. And as @ArthurRM already stated, a cgm file is normally stored in a DrawingSheet dataset. Most companies change the NxToCgmDirect translator to create PDF's from the CGM and don't store the CGM directly (using switches "-nocgm -pdf").

At NX9, the raster format was changed from .jpg to .png which has caused some viewer issues but can be changed back to the old behavior by using "set UGII_CGM_RASTER_ELEMENT=rle_cell" in nxtocgmdirect.bat.

A more popular approach is to convert the cgm to pdf and store the PDF by changing the arguments to export_ugdwgimages.exe:
"%UGII_BASE_DIR%\Ugmanager\export_ugdwgimages.exe" -all -text=text -pdf -nocgm %*
This will create a CGM then convert to PDF and throw away the CGM.

Prior to NX 9.0, the default raster-image format was "run-length-encoded cell array", but for NX 9.0 the default format was changed to PNG in order to reduce the size of the CGM file.

Some CGM viewers do not support PNG format, so if a customer must use such a viewer, they can set environment variable UGII_CGM_RASTER_ELEMENT before starting NX to cause CGM export functionality to record raster images in a different format.

Here are the possible settings:

The default NX 8.5 format is rle_cell (run-length-encoded cell array); nearly all CGM viewers support this format. The default NX 9.0 format is png.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4