×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Exporting drawing to dxf not to scale

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

RE: Exporting drawing to dxf not to scale

Are all the views on your drawing the same 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

(OP)
The views are the same 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

Quote (me)

Are all the views on your drawing the same scale?
If so, you can query the scale of one of the views and use the reciprocal of the value in the ExportCGM subroutine.

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

(OP)
I think the cgm will work the way you had expected. I modified your journal by putting the scale factor to equal 2.

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

In my testing, I was getting some strange results if the sheet scale was changed after the views were added. I haven't fully explored the ramifications of changing sheet scale/view scale, but the following journal seems to work in most cases. If you run into an issue that you can duplicate, please let me know...

NXJ_export_dxf_fullscale.vb

www.nxjournaling.com

RE: Exporting drawing to dxf not to scale

(OP)
So far it is working. I'll let you know if I find a case where it doesn't work.

thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources