CGMBuilder issue and question

I am getting an error when running a journal to export the current sheet to cgm. I am getting the error "NX Error Status: 3555024" when it tries to commit. I am currently using a very similar sub to export the visible sheet to pdf with no issues. What have I missed in the CGMBuilder?

Sub ExportCGM(dwg As Drawings.DrawingSheet, exportFileName As String, units As Integer)

Try
Dim CGMBuilder1 As CGMBuilder
CGMBuilder1 = workPart.PlotManager.CreateCGMBuilder()
CGMBuilder1.Colors = CGMBuilder.Color.BlackOnWhite
CGMBuilder1.Size = CGMBuilder.SizeOption.Dimension
If units = 0 Then
CGMBuilder1.Units = CGMBuilder.UnitsOption.English
Else
CGMBuilder1.Units = CGMBuilder.UnitsOption.Metric
End If
CGMBuilder1.XDimension = dwg.height
CGMBuilder1.YDimension = dwg.length
CGMBuilder1.OutputText = CGMBuilder.OutputTextOption.Polylines
CGMBuilder1.RasterImages = True
CGMBuilder1.ImageResolution = CGMBuilder.ImageResolutionOption.High

Dim sheets1(0) As NXObject
Dim drawingSheet1 As Drawings.DrawingSheet = CType(dwg, Drawings.DrawingSheet)
sheets1(0) = drawingSheet1
CGMBuilder1.SourceBuilder.SetSheets(sheets1)

Dim filenames1(0) As String
filenames1(0) = exportFileName
CGMBuilder1.SetFilenames(filenames1)

Dim nXObject1 As NXObject
nXObject1 = CGMBuilder1.Commit()

CGMBuilder1.Destroy()

Catch ex as Exception
MessageBox.Show (ex.Message)
End Try

End Sub

I knew I would find what I was missing as soon as I asked. I was missing the line:
CGMBuilder1.Action = CGMBuilder.ActionOption.FileBrowser

FileBrowser Option allows for export of CGM file to local location when running Teamcenter

Thanks for posting your solution, it will help others that run into the same problem.

Hi,
Can i get the above program in complete format, so that i can use in my system. Pl. Help

Thanks

Praveen