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: 

Export CAD and coordinations

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
halganabi
177 Views, 2 Replies

Export CAD and coordinations

I Have a 3d sketch, 
it has lines, and also points, all together making a geometry as shown

halganabi_0-1702470677338.png

I want to export a CAD, 3d or 2d Top is okay, 
showing the lines and point and a label of coordiation X Y Z. 

This require a coding if someone can help 

halganabi_1-1702470830379.png

please find attached inventor file

Any similar idea or any thing can help doing this task is acceptable, 
at the end i don't want to fill the XYZ manually for each point as a repeated work.

thanks

2 REPLIES 2
Message 2 of 3
JelteDeJong
in reply to: halganabi

You could use the following work flow:

Create a drawing and create views.

JelteDeJong_3-1702554945118.png

Include work features. (User work points)

JelteDeJong_0-1702554802518.png

JelteDeJong_1-1702554843233.png

Run the following iLogic rule and select the workpoints that need an XYZ value leader. (press 'ESC' if you selected all)

Dim doc As DrawingDocument = ThisDoc.Document
Dim sheet As Sheet = doc.ActiveSheet

While True
    Dim centerMark = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCentermarkFilter, "Select a center mark")

    If (centerMark Is Nothing) Then Exit While

    Dim workPoint As WorkPoint = centerMark.ModelWorkFeature
    Dim x = Math.Round(workPoint.Point.X * 10)
    Dim y = Math.Round(workPoint.Point.Y * 10)
    Dim z = Math.Round(workPoint.Point.Z * 10)


    Dim leaderTextPoint = ThisApplication.TransientGeometry.CreatePoint2d(centerMark.Position.X + 1, centerMark.Position.Y + 2)

    Dim points = ThisApplication.TransientObjects.CreateObjectCollection()
    points.Add(leaderTextPoint)
    points.Add(centerMark.Position)

    sheet.DrawingNotes.LeaderNotes.Add(points, String.Format("X: {0}mm<br />Y:{1}mm<br />Z:{2}mm<br />", x, y, z))
End While

JelteDeJong_4-1702555047837.png

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3
halganabi
in reply to: JelteDeJong

Brilliant!!

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report