- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found another quicker way. In base component in which I have defined points to which I am constraining, i run this rule:
Dim bod1 As WorkPoint
Dim bod2 As WorkPoint
Dim vzdalenost As Double
Dim maxpolozka = 0
For Each Item In ThisApplication.ActiveDocument.ComponentDefinition.WorkPoints
maxpolozka = maxpolozka + 1
Next
'MessageBox.Show(Cstr(maxpolozka),"index max bodu")
'MessageBox.Show(ThisApplication.ActiveDocument.ComponentDefinition.WorkPoints(maxpolozka), "index max bodu")
For i = 1738 To maxpolozka
bod1 = ThisApplication.ActiveDocument.ComponentDefinition.WorkPoints(i)
i = i+1
bod2 = ThisApplication.ActiveDocument.ComponentDefinition.WorkPoints(i)
'i = i + 1
'MessageBox.Show(bod1.Name,bod2.Name)
vzdalenost = Measure.MinimumDistance(bod1.Name, bod2.Name)
If vzdalenost > 283.1 Or vzdalenost < 283
MessageBox.Show(bod1.Name,CStr(vzdalenost))
Exit Sub
End If
Next
The distance between two neighboring points must be in some tolerance. So i firstly check this in part in which points are defined and after that I run rule for contraint creation in assembly. It is much more quicker than updating the assembly (even with silent operation)
Thank you a lot for your help ![]()