Exporting drawing to dxf not to scale
Exporting drawing to dxf not to scale
(OP)
I am trying to export a NX drafting file to a dxf format by using a journal. The journal function works but if the drawing is scaled how do I change the journal to make it 1:1? The new dxf will be used by other departments for measurments and should be 1:1.
Below is part of the code I changed that will scale the dxf but only if the drawing was 1:2.
What can I replace for the factor of 2 in order for this to work on any scaled drawing sheet?
Sub ExportCGM(ByVal dwg As Drawings.DrawingSheet, ByVal outputFile As String, ByVal units As Integer)
Dim filenames1(0) As String
Dim objCGM As CGMBuilder
objCGM = theSession.Parts.Work.PlotManager.CreateCgmBuilder()
objCGM.Action = CGMBuilder.ActionOption.FileBrowser
objCGM.Size = CGMBuilder.SizeOption.ScaleFactor
objCGM.Scale = 2
Below is part of the code I changed that will scale the dxf but only if the drawing was 1:2.
What can I replace for the factor of 2 in order for this to work on any scaled drawing sheet?
Sub ExportCGM(ByVal dwg As Drawings.DrawingSheet, ByVal outputFile As String, ByVal units As Integer)
Dim filenames1(0) As String
Dim objCGM As CGMBuilder
objCGM = theSession.Parts.Work.PlotManager.CreateCgmBuilder()
objCGM.Action = CGMBuilder.ActionOption.FileBrowser
objCGM.Size = CGMBuilder.SizeOption.ScaleFactor
objCGM.Scale = 2





RE: Exporting drawing to dxf not to scale
If so, you can query the scale of one of the views and use the reciprocal of the value in the ExportCGM subroutine.
www.nxjournaling.com
RE: Exporting drawing to dxf not to scale
How would I query the scale and put that in the subroutine?
I have little experience in modifying/writing journals.
thanks
RE: Exporting drawing to dxf not to scale
Scratch that. The CGM export scale doesn't work quite the way I expected, you can only use it to scale down a view. If the view scale is less than 1, it can't be used to scale a view back up to full scale. I have an idea for a work-around, but have not tested it yet...
www.nxjournaling.com
RE: Exporting drawing to dxf not to scale
objCGM.Size = CGMBuilder.SizeOption.ScaleFactor
objCGM.Scale = 2
I have a drawing that is 1:2 and after using the journal with the scale set to 2 the drawing was 1:1 when I opened it as a dxf.
RE: Exporting drawing to dxf not to scale
NXJ_export_dxf_fullscale.vb
www.nxjournaling.com
RE: Exporting drawing to dxf not to scale
thanks