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: 

Create drawing dimensions from a list of 3D points

0 REPLIES 0
Reply
Message 1 of 1
jacopo_chiappetti
206 Views, 0 Replies

Create drawing dimensions from a list of 3D points

I made an app in Inventor that draws some skecthes and makes extrusions, bends and so on in an IPT file.

I put some of "interest" points on a list: i.e. the center of sketch circles, axes and so on

Then my app create an IDW with a sheet and a view.

I need to create drawing dimensions from the list of 3D points recorded while model the part.

I made several attempts, even looking at the code in other posts, but I always get the same "general" error.

this is one of the attempts bu I tried also to use objs instead of points and I had the same error

                    Dim oShtPt1 As Point2d = oView.ModelToSheetSpace(p1)
                    Dim oShtPt2 As Point2d = oView.ModelToSheetSpace(p2)
                    Dim oGeomIntent1 As GeometryIntent = oSheet.CreateGeometryIntent(oShtPt1, IntentTypeEnum.kPoint2dIntent)
                    Dim oGeomIntent2 As GeometryIntent = oSheet.CreateGeometryIntent(oShtPt2, IntentTypeEnum.kPoint2dIntent)
                    Dim oDimX As Double = (oGeomIntent1.PointOnSheet.X + oGeomIntent2.PointOnSheet.X) / 2
                    Dim oDimY As Double = oGeomIntent1.PointOnSheet.Y + 2
                    Dim oPtText As Point2d = oTransGeom.CreatePoint2d(oDimX, oDimY)
                    Dim oDimension As DrawingDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2)

 

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report