Ilogic linear dimension control position of dimension

Ilogic linear dimension control position of dimension

kairobert
Contributor Contributor
351 Views
2 Replies
Message 1 of 3

Ilogic linear dimension control position of dimension

kairobert
Contributor
Contributor

Is there more option where i could control position of my dimension. Default system snippet code refer to sheetpoint. If i have an dimension of a part that is moving around x or y, this does not work very well. Could i refer to a workpoint?

 

Example: Could i create an linear dimension between work point1 and work point 2, and said it should be placed like this: x=0 and y=1 from work point 3

 

kairobert_0-1694414409433.png

kairobert_0-1694418326923.png

 

0 Likes
Accepted solutions (1)
352 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor
Accepted solution

It's possible use points and coordinates (not the sheet points) but it requires some extra coding. Have a look at this example rule:

Dim sheet = ThisDrawing.ActiveSheet
Dim view = sheet.DrawingViews.ItemByName("VIEW1")

Dim geo1 = view.GetIntent("Work Point1")
Dim geo2 = view.GetIntent("Work Point2")
Dim geo3 = view.GetIntent("Work Point3")

Dim genDimensions = sheet.DrawingDimensions.GeneralDimensions

ThisDrawing.BeginManage

Dim point = ThisDrawing.Geometry.Point2d(0, 0) 
point.InDatabaseUnits = geo3.PointOnSheet 
point.X = point.X + 0
point.Y = point.Y + 1
	
genDimensions.AddLinear("test", point, geo1, geo2)

ThisDrawing.EndManage

You didn't explain what was not working for you with the sheet points but I did have some problems on my own. In the following topic, we did get the sheet points to behave. Maybe this is also of some help to you.

https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/unexpected-dimension-text-place/td-p...

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

0 Likes
Message 3 of 3

kairobert
Contributor
Contributor

Yes, this code can i use 😄

Thanks 😄

0 Likes