How to Draw Centerlines Between Sketched Circles on a Drawing

petestrycharske
Advisor

How to Draw Centerlines Between Sketched Circles on a Drawing

petestrycharske
Advisor
Advisor

All,

 

Good afternoon!  I've got an interesting challenge where I'm using Inventor drawing sketches for geometry and want to draw centerlines between the sketched circles.  I can accomplish this task manually, so it should be possible programmatically.  If anyone can point me in the right direction, I would really appreciate it.  Thanks in advance for any assistance and let me know if you have any questions.  Hope all is well and have a most blessed day!

Peace,
Pete

 

 

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
0 Likes
Reply
Accepted solutions (1)
467 Views
2 Replies
Replies (2)

Michael.Navara
Advisor
Advisor
Accepted solution

You are looking for something like this?

Dim sheet As Sheet = ThisDrawing.ActiveSheet.Sheet

Dim sk1 As DrawingSketch = sheet.Sketches(1)
Dim skCircle1 = sk1.SketchCircles(1)
Dim skCircle2 = sk1.SketchCircles(2)

Dim intent1 = sheet.CreateGeometryIntent(skCircle1)
Dim intent2 = sheet.CreateGeometryIntent(skCircle2)

Dim centerEntities As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection()
centerEntities.Add(intent1)
centerEntities.Add(intent2)

sheet.Centerlines.Add(centerEntities)

petestrycharske
Advisor
Advisor

Thanks @Michael.Navara!  It was the Sheet.CreateGeometryIntent that eluded me for some reason...  Thanks for the help and have a most blessed day!

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
0 Likes