Centermark as GeometryIntent for LinearGeneralDimension

Centermark as GeometryIntent for LinearGeneralDimension

andrejSAYQ6
Explorer Explorer
564 Views
5 Replies
Message 1 of 6

Centermark as GeometryIntent for LinearGeneralDimension

andrejSAYQ6
Explorer
Explorer

Hi,

I have a Question Regarding LinearGeneralDimensions which are placed between two centermarks. When I am doing Horizontal LinearGeneralDimension Extention Lines of a dimension go from the very center of the CenterMark, but When I am doing Vertical LinearGeneralDimension  Extention Lines of a dimension go from the Centermarks MarkSize lines tip. Maybe it has something to do with GeometryIntents, but i read the properties of LinearDimensions Placed manually between center marks and it seems that at all cases if a very center of a centermark is selected or one of four points on the MarkSize it gives back the IntentTypeEnum.kPoint2dIntent. I Even tried to put Centermark.Position into GeometryIntent creation method in the Optional variable. Have anyone noticed it and maybe has a solution? Because I really would like it to go from very center at all times. It seems like the only solution for me is to reduce marksize to 0.0001 so it is not noticeble. 

 

0 Likes
Accepted solutions (1)
565 Views
5 Replies
Replies (5)
Message 2 of 6

andrejSAYQ6
Explorer
Explorer

Actually when doing dimensions by hand in the drawing it is oposite, horizontal dimensions extensionlines start from the centermarks extensionlines tip, and vertical from the very center of centermark. Why there are these differences between UI Inventor and API?

0 Likes
Message 3 of 6

J-Camper
Advisor
Advisor

Position is a point on the sheet and loses relation to the centermark object.  When I add leaders to centermarks, I use the centermark itself as the attachment GeometryIntent.

 

Out of context Snippet:

Dim Attachment As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection
	Attachment.Add(oCM.Position)
	Attachment.Add(MySheet.CreateGeometryIntent(oCM))

oCM is a centermark, so I'm making a geometry intent on MySheet, a sheet object, to the centermark itself.  Have you tried something like this or just the position?

0 Likes
Message 4 of 6

andrejSAYQ6
Explorer
Explorer

Well I am creating GeometryIntents, and i'm not sure if GeneralDimensions.AddLinear Accepts ObjectCollection as GeometryIntents, maybe this one is for leaders only.

GeneralDimensions.AddLinear(TextOrigin As Point2d, IntentOne As GeometryIntent, Optional IntentTwo As Object = Nothing, Optional DimensionType As DimensionTypeEnum = DimensionTypeEnum.kAlignedDimensionType, Optional ArrowheadsInside As Boolean = True, Optional DimensionStyle As Object = Nothing, Optional Layer As Object = Nothing) As LinearGeneralDimension


This is What i do:

 

Dim TextOrigin As Point2d = InventorServer.TransientGeometry.CreatePoint2d(X, Y)
Dim CenterMarkOne As Centermark = DrawingSheet.Centermarks.AddByWorkFeature(WorkFeature1, DrawingView)
Dim CenterMarkTwo As Centermark = DrawingSheet.Centermarks.AddByWorkFeature(WorkFeature2, DrawingView)
Dim IntentOne As GeometryIntent = DrawingSheet.CreateGeometryIntent(CenterMarkOne, Inventor.IntentTypeEnum.kPoint2dIntent)
Dim IntentTwo As GeometryIntent = DrawingSheet.CreateGeometryIntent(CenterMarkTwo, Inventor.IntentTypeEnum.kPoint2dIntent)
Dim DimensionType As DimensionTypeEnum = DimensionTypeEnum.kVerticalDimensionType
DrawingSheet.DrawingDimensions.GeneralDimensions.AddLinear(TextOrigin, IntentOne, IntentTwo, DimensionType)

 

So the Inventor.IntentTypeEnum.kPoint2dIntent is optional, but i have tried different inputs there, it snaps the same way each time.

0 Likes
Message 5 of 6

J-Camper
Advisor
Advisor
Accepted solution

Yeah I just wanted an idea of how you were using the centermark geometry intent.

 

I see what you mean now, it is a very peculiar difference between those two LinearDimensionTypes.  It doesn't make sense to me that the dimension extension points have a different relationship to the centermark center for Vertical vs Horizontal, with the same inputs.  I can't imagine why this difference would be intended.

 

I can think of a workaround using a sketchline between those points [with the line options set to something that doesn't print] and dimensioning the sketchline but it seems messy. I can help with that if you want, but other than that I'm not much help on this one.

 

0 Likes
Message 6 of 6

andrejSAYQ6
Explorer
Explorer

Actually that would be a great workaround, it's funny that I didn't think about it earlier. I might use this options if this CenterMark thingy will start to very irritate me. I will make a sketch in DrawingView, make a sketchline between those two centermarks, Sketchline.SketchOnly=true will hide it in the Sheet. And I'll just use this line as geometryIntent. It will be pretty messy, but I will mark your answer as a solution, Thanks!

0 Likes