Not really a problem, more just a niggle...
When we create a drawing of a sheet metal part, we always place a 1:1 scale flat pattern on a second sheet in the same file, that has no border or title block. We then save this second sheet out as the dxf for our laser profiling suppliers.
On large or long parts, the profile often overlaps the edges of the sheet, which in itself is of course not a problem. I then would like to zoom extents to fill the screen with the part, so I can check it quickly before exporting, but we don't have that option. Currently I have to zoom with the mouse wheel, but of course the zoom on that jumps in stages, so then I have to zoom window. I've got zoom all, but that zooms to the sheet size, so no good.
Is the zoom extents just deemed unnecessary in Inventor dwgs? I've looked in the App. Options, etc, but can't see anything.
Using Inventor Pro 2017
Many thanks
Solved! Go to Solution.
Solved by steve_lindley. Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
@steve_lindley wrote:
Is the zoom extents just deemed unnecessary in Inventor dwgs? I've looked in the App. Options, etc, but can't see anything.
Many thanks
Yes as typically one would always make their part fit onto the sheet..
So the only real option you have is to increase your sheet size to full encompass your 1:1 part..
Or create your dxf directly from the part file.. via "export face as" or "save copy as" option from the flat pattern node
@mcgyvr wrote:
So the only real option you have is to increase your sheet size to full encompass your 1:1 part..
Or create your dxf directly from the part file.. via "export face as" or "save copy as" option from the flat pattern node
Hi steve.lindley,
Another option might be to place the view scaled to fit the sheet, and then use the DXF export Options to export the model geometry to model space and scale it using one of these options.
Are there reasons these options don't work for you?
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Many thanks to both swift replies. In answer to your suggestions, I should perhaps explain our methods.
As with most companies I presume, we have some hang-ups from years ago where we are expected to include a 'label' with each dxf that includes the file name, material, thickness and revision. We also include scale as an easy visual check that it will be exported at the right size (years ago, someone dropped a clanger and we recieved 1/4 scale parts). I've never saved the dxf straight from the .ipt before, so I'm just playing with that at the minute to see if that's still possible. If so, that would be a time saver for sure. If you've got any suggestions on how to achieve this, I'd be grateful. I assume I'd have to tick the Post Process - Customise box and do something with that?
I don't see increasing the sheet size as an option, as every flat pattern size is different. I'm trying to reduce my mouse clicks, rather than add them.
If I can't get the label to work when exporting from the part, I'll certainly look at the dxf configuration settings. We currently use the Base view Scale - Model Space, but I hadn't noticed the other option for Full Scale before. This would certainly work for me. I would just have to persuade the chief that we don't need to include the scale in the label so long as this setting is used.
@steve_lindley wrote:
Many thanks to both swift replies. In answer to your suggestions, I should perhaps explain our methods.
As with most companies I presume, we have some hang-ups from years ago where we are expected to include a 'label' with each dxf that includes the file name, material, thickness and revision.
Put that in the file name if you want..
Or edit the dxf after even to add your stuff.. Probably just as quick as working through the idw..
But IMO.. A dxf is for programming purposes only.. Its not there to include material callouts, etc... Thats what the 2d drawing is for..
dxf needs to only have part number and rev in its filename..
@steve_lindley wrote:
I don't see increasing the sheet size as an option, as every flat pattern size is different. I'm trying to reduce my mouse clicks, rather than add them.
Hi steve.lindley,
If the other options don't work out, here's a quick iLogic rule that will find the 1st view on the active sheet and then set the scale to 1:1, then scale the sheet size to match, then center the view on the sheet.
Note I didn't test this much, so post back if you see issues with it. Edit: it had issues, so I pulled it, I'll try and post back with an updated version if can find the time.
Edit again...Fixed it ( I think), post back if you see issues.
I'd set this up as an external rule. If you're not familiar with setting up an ilogic rule just shout back , and someone will point you in the right direction.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
'Fixed this version :
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet. Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet 'get 1st view on active sheet Dim oView As DrawingView oView = oActiveSheet.DrawingViews(1) 'set view scale to 1:1 ActiveSheet.View(oView.Name).Scale = 1 'add a margin value oMargin = 0.1 'cm 'get width, divide by conversion factor 'and add margin Dim oWidth As Double oWidth = (oView.Width / 2.54) + oMargin 'get Height, divide by conversion factor 'and add margin Dim oHeight As Double oHeight = (oView.Height / 2.54) + oMargin 'change the sheet size ActiveSheet.ChangeSize(oWidth,oHeight , MoveBorderItems := True) 'center the view ActiveSheet.View(oView.Name).SetCenter(oHeight/2, oWidth/2) 'zoom all ThisApplication.ActiveView.Fit
A quick update:
My previous version of this ilogic was not working well when the view and sheet were not the same orientation. This version handles that by flipping from portrait to landscape.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet. Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet 'get 1st view on active sheet Dim oView As DrawingView oView = oActiveSheet.DrawingViews(1) 'set view scale to 1:1 ActiveSheet.View(oView.Name).Scale = 1 'add a margin value oMargin = 0.1 'cm 'get width, divide by conversion factor 'and add margin Dim oWidth As Double oWidth = (oView.Width/2.54 ) + oMargin 'get Height, divide by conversion factor 'and add margin Dim oHeight As Double oHeight = (oView.Height/2.54 ) + oMargin If oView.Width < oView.Height Then 'resize the view ActiveSheet.ChangeSize(oWidth, oHeight , MoveBorderItems := True) 'center the view ActiveSheet.View(oView.Name).SetCenter(oWidth/2,oHeight/2) 'change sheet Orientation ThisApplication.ActiveDocument.ActiveSheet.Orientation = _ PageOrientationTypeEnum.kPortraitPageOrientation Else If oView.Height < oView.Width Then 'resize the view ActiveSheet.ChangeSize(oHeight, oWidth, MoveBorderItems := True) 'center the view ActiveSheet.View(oView.Name).SetCenter(oWidth/2,oHeight/2) 'change sheet Orientation ThisApplication.ActiveDocument.ActiveSheet.Orientation = _ PageOrientationTypeEnum.kLandscapePageOrientation Else 'width and height are equal 'resize the view ActiveSheet.ChangeSize(oHeight, oHeight, MoveBorderItems := True) 'center the view ActiveSheet.View(oView.Name).SetCenter(oHeight/2, oHeight/2) End If 'zoom all ThisApplication.ActiveView.Fit
Thanks to everyone for suggestions, I really appreciate others taking time to help me out.
Curtis, if I can get that ilogic rule to work, then happy days. It allows me to keep the chief happy, regardless of whether that label is necessary and my obsession with the zoom can be put to bed!
I've tried it this morning on a drawing I did yesterday. I placed the view at 1:10 scale on an A2 sheet then ran the rule. The scale of the view increases to 1:1, the view centres on the sheet and the zoom all works a treat. However, the sheet size is not quite right. The sheet actually shrinks rather than increases, so for a start I can't see the profile at all. Please see screen grabs attached. I struggle to follow ilogic if I'm honest so forgive me if I'm completely reading it wrong. Typically my view is bigger than the sheet, so I was expecting to see a multiplication factor applied to the sheet but I can only see division. Is that the cause do you think?
Easiest workaround would be a 3D motion controller (SpaceMouse, for example), allowing you to quickly zoom/pan to any view of the sheet that you want.
Sam B
Inventor Professional 2017 R3
Vault Basic 2017.0.1
Windows 7 Enterprise 64-bit, SP1
Inventor Certified Professional
After a bit of playing, I finally got where I wanted to be with the code. Just not sure how or when to trigger the rule yet. For other's to use or improve, I've copied the code below. The problems I was seeing, seemed to be caused by the units, (my document settings use mm), so the view width was a factor of 10 smaller. Thanks to everyone for their comments.
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
' Set a reference to the active sheet.
Dim oActiveSheet As Sheet
oActiveSheet = oDrawDoc.ActiveSheet
'get 1st view on active sheet
Dim oView As DrawingView
oView = oActiveSheet.DrawingViews(1)
'set view scale to 1:1
ActiveSheet.View(oView.Name).Scale = 1
'add a margin value
oMargin = 100.0 'mm
'get width,
'and add margin
Dim oWidth As Double
oWidth = (ActiveSheet.View("VIEW1").Width) + oMargin
'get Height,
'and add margin
Dim oHeight As Double
oHeight = (ActiveSheet.View("VIEW1").Height) + oMargin
If oView.Width < oView.Height Then
'resize the view
ActiveSheet.ChangeSize(oWidth, oHeight , MoveBorderItems := True)
'center the view
ActiveSheet.View("VIEW1").SetCenter(oWidth/2,oHeight/2)
'change sheet Orientation
ThisApplication.ActiveDocument.ActiveSheet.Orientation = _
PageOrientationTypeEnum.kPortraitPageOrientation
Else If oView.Height < oView.Width Then
'resize the view
ActiveSheet.ChangeSize(oHeight, oWidth, MoveBorderItems := True)
'center the view
ActiveSheet.View(oView.Name).SetCenter(oWidth/2,oHeight/2)
'change sheet Orientation
ThisApplication.ActiveDocument.ActiveSheet.Orientation = _
PageOrientationTypeEnum.kLandscapePageOrientation
Else
'width and height are equal
'resize the view
ActiveSheet.ChangeSize(oHeight, oHeight, MoveBorderItems := True)
'center the view
ActiveSheet.View(oView.Name).SetCenter(oHeight/2, oHeight/2)
End If
'zoom all
ThisApplication.ActiveView.Fit
Can't find what you're looking for? Ask the community or share your knowledge.