Drawing Geometry Intent from 3D model coordinates.

Drawing Geometry Intent from 3D model coordinates.

Mario-Villada
Advocate Advocate
2,855 Views
6 Replies
Message 1 of 7

Drawing Geometry Intent from 3D model coordinates.

Mario-Villada
Advocate
Advocate

Hi all,

 

I am trying to add ordinate dimensions to a drawing view. I know exactly the 3D model coordinates where I want the dimentions to be placed in a drawing view.Do you think this is possible? My approach is to get  2D points using either DrawingView.ModelToSheetSpace or DrawingView.ModelToDrawingViewSpace Methods and use them to place the dimensions, but i am getting stuck when OrdinateDimensions.Add Method asks me for a geometry intent.

 

Is there any way to select a curve in a drawing view given a 2D point and then use it for creating a geometry intent?

 

thanks in advance for any help

0 Likes
Accepted solutions (1)
2,856 Views
6 Replies
Replies (6)
Message 2 of 7

YuhanZhang
Autodesk
Autodesk

Which model object is the 3D model coordinates based on? You can use the DrawingCurves(ModelObject) to get the drawing geometry(drawing curve), and then create dimension on the drawing geometry(pass the drawing curve into a GeometryIntent with specifying the coordinates converted from 3D model coordinates).



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 3 of 7

Mario-Villada
Advocate
Advocate

Thanks for your Reply Rocky, I think this method (DrawingCurves) will lead me to the answer, I had no idea it existed, thanks again for the advise. So the next step for me will be to get a reference on the model to filter the curve I want to use to place the dimensions.

 

In regards to your question, I have a drawing view from an assembly file. This assembly  have some parts inserted in specific x,y,z coordinates, these are the coordinate that I already know, besides, these coordinates correspond to the center points in the Origin folder (model browser) of each part i put in the assembly of course transformed by a position matrix. these points also  lies in horizontal faces of the parts, that appear as a horizontal lines in the drawing view. These horizontal lines are the ones I want to use for placing ordinate dimensions.

 

So here are another two questions:

 

1. How can I filter these faces (or edges) from the assembly that will return the horizontal lines i will use for placing the dimensions?

 

2. Is it possible to get a geometry intent object in a drawing view from a center point?

 

Rocky, whe you say "pass the drawing curve into a GeometryIntent with specifying the coordinates converted from 3D model coordinates" You mean by using CreateGeometryIntent method?, how can I specify the coordinates in this method?

 

Best Regards,

 

Mario.

 

0 Likes
Message 4 of 7

herrwolf1
Enthusiast
Enthusiast

Are you using VB.Net or VBA?

0 Likes
Message 5 of 7

Mario-Villada
Advocate
Advocate

I  am using COM automation through Delphi. so VBA code is what I translate to delphi.

0 Likes
Message 6 of 7

YuhanZhang
Autodesk
Autodesk
Accepted solution

Hi Mario,

 

If you put an assembly onto drawing sheet, then you should pass in an EdgeProxy/FaceProxy to the DrawingCurves(ModelObject) to get the drawing curve. Use the ComponentOccurrence.CreateGeometryProxy to create the EdgeProxy/FaceProxy.

 

For the #2 question, I want to make sure you mean the center point you the drawing view's center? If so you should make sure there is a geometry(DrawingCurve, sketch entities from a sheet sketch, DrawingDimension, Centerline, and Centermark) that lay on the center of the drawing view.

 

To get the coordinates that you can use the ModelToSheetSpace to convert a model 3D coordicates(Point) to a 2D coordinates(Point2d), and specify the Point2d as the Intent of the CreateGeometryIntent.

 

Hope these help.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 7 of 7

Mario-Villada
Advocate
Advocate

Thanks again Rocky, This clarifies what i need to do. I will give it a go.

 

Mario.

0 Likes