3D Part to New Dimensioned 2D dwg

3D Part to New Dimensioned 2D dwg

Anonymous
Not applicable
562 Views
2 Replies
Message 1 of 3

3D Part to New Dimensioned 2D dwg

Anonymous
Not applicable

I was referred here from the regular Inventor forum. I copy and pasted my original question. I was told that the Retrieve Dimension could be used for this. Is there a way to code this into my 3D part to create automatically a dwg with the retrieve dimensions on it? Thanks in advance! Original question posted below. Have a great day.

 

Nate

 

"Hello,

 

I am an engineering intern working on a project to commonize a part. I used iLogic rules and forms and have created a 3D part which upon opening, the user can put in the needed dimensions and select the option of which cutout they would like (square, hex, or octagon). Now I would like to make it easier on the users who open the file. My end goal is to have the user select all the options, their part gets created and automatically a 2D .dwg (ideally with basic dimensions on it) gets created and saved as a separate name. I don't really care where the file gets saved right now it can be in the same folder as the 3D part creator. Is it possible to make a program to automatically create a new dimensioned dwg out of a new part each time a new user opens the file and creates what they need? I've attached a screenshot of the basic options the user will see upon opening. A basic octagon cutout is shown. Thank you in advance.

 

Nate"

0 Likes
563 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

UPDATE:

 

Even if it's not possible to get automatic dimensions, how would I take my .ipt, make an ilogic rule that just puts 2 or 3 views into a .idw file. The user can dimension what they would like. Is it possible to just do this?

 

Thank you.

 

Nate

0 Likes
Message 3 of 3

Jef_E
Collaborator
Collaborator

It both should be possible if you read the API and make something yourself or hire someone to do it for you.

 

Maybe do some research and see that this question already has been asked?

https://forums.autodesk.com/t5/inventor-customization/retrieve-dimensions/td-p/3650292

 

DrawingViews.AddBaseView Method

Parent Object: DrawingViews

 

Description

Method that creates a new base . The newly created DrawingView is returned.

 

Syntax

DrawingViews.AddBaseView( Model As Document, Position As Point2d, Scale As Double, ViewOrientation As ViewOrientationTypeEnum, ViewStyle As DrawingViewStyleEnum, [ModelViewName] As String, [ArbitraryCamera] As Variant, [AdditionalOptions] As Variant ) As DrawingView

 

Parameters

Name Description
Model Input Document that specifies the document to create the view of. Valid document types include part file, assembly files, and presentation files. This method uses a Document object as input rather than a filename to allow the insertion of a document into a drawing and avoid the requirement of that document first being saved to a file. If a document already exists as a file on disk you can use the Documents.Open method to open the file and obtain a Documents object. Typically, you'll want to set the OpenVisible argument of the Open method to False so the open is invisible to the user.
Position Input Point2d that specifies the placement point of the view on the sheet.
Scale Input Double that specifies the drawing view scale factor.
ViewOrientation Input ViewOrientationTypeEnum that specifies the orientation of the model within the view. If this value is kArbitraryViewOrientation the orientation is derived from the Camera specified by the ArbitraryCamera argument.
ViewStyle Input DrawingViewStyleEnum the specifies the display style of the geometry within the view. Valid values are kHiddenLineDrawingViewStyle, kHiddenLineRemovedDrawingViewStyle, kShadedDrawingViewStyle, and kShadedHiddenLineDrawingViewStyle. If kFromBaseDrawingViewStyle is specified, an error is returned.
ModelViewName Optional input String that defines the design view name for assembly files, or the presentation view name for presentation files. This argument is ignored if the document type specified by the Model argument is a part file (.ipt).
ArbitraryCamera Optional input Camera object that specifies the model orientation within the view. This argument is ignored if the ViewOrientation argument is not kArbitraryViewOrientation.
AdditionalOptions Optional input NameValueMap object that specifies additional or advanced options as described in the remarks section.

Remarks

Valid values for the NameValue map of the AdditionalOptions argument is shown below:

Name Type Valid Document Type Notes
WeldmentFeatureGroup Value from WeldmentFeatureGroupEnum Weldment  
SheetMetalFoldedModel Boolean Sheet metal PartDocument The part document must contain a flat pattern if a flat view (False) is specified. If a flat doesn't exist, a folded view will be created.
DesignViewRepresentation String Assembly The name of the design view representation.
DesignViewAssociative Boolean Assembly Indicates if the drawing view will be associative to the design view. A design view must be specified.
PositionalRepresentation String Assembly The name of the positional representation.
MemberName String Part, Assembly The name of the iPart or iAssembly member.
PresentationView String Presentation The name of the presentation view.
PresentationViewAssociative Boolean Presentation Indicates if the view should be associative to the presentation view. A presentation view must be specified

 

Samples

Name Description
Adding Representation views This sample demonstrates how to create a base view by specifying various representations.
Create flat pattern drawing view This sample demonstrates the creation of a flat pattern base view in a drawing.
Create base view with representations This sample demonstrates how to create a base view by specifying various representations.

 

Version

Introduced in Inventor version 6

 

GeneralDimensions.Retrieve Method

 

Description

Method that retrieves sketch and/or model dimensions into the drawing.

 

Syntax

GeneralDimensions.Retrieve( ViewOrSketch As Object, [DimensionsToRetrieve] As Variant ) As GeneralDimensionsEnumerator

 

Parameters

Name Description
ViewOrSketch Input object that specifies the DrawingView or the DrawingSketch object to retrieve dimensions from. If a DrawingSketch object is specified, it must be owned by a Sheet. A DrawingSketch owned by a drawing view is invalid input.

 

DimensionsToRetrieve Optional input ObjectCollection that specifies the dimensions to retrieve. If not specified, all dimensions from the specified view or sketch are retrieved. If specified, the collection can contain sketch constraint objects or their proxies that derive from DimensionConstraint, FeatureDimension objects or FeatureDimensionProxy objects. The objects must belong to the view or sketch specified in the first argument, else an error will occur.

 

Version

Introduced in Inventor version 9



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes