Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Drawing Geometry Intent from 3D model coordinates.

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Mario-Villada
2558 Views, 6 Replies

Drawing Geometry Intent from 3D model coordinates.

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

6 REPLIES 6
Message 2 of 7
YuhanZhang
in reply to: Mario-Villada

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.

Message 3 of 7
Mario-Villada
in reply to: YuhanZhang

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.

 

Message 4 of 7
herrwolf1
in reply to: Mario-Villada

Are you using VB.Net or VBA?

Message 5 of 7
Mario-Villada
in reply to: herrwolf1

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

Message 6 of 7
YuhanZhang
in reply to: Mario-Villada

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.

Message 7 of 7
Mario-Villada
in reply to: YuhanZhang

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

 

Mario.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report