Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like to dimension the bottom of a groove in iLogic. Here is it using the UI:
I have named the angled face in the part and I want my intents to point to most inner part. I have tried the nearPoint method and the PointIntentEnum method to no avail.
Here is my code, I have also attached the files:
Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument Dim oSheet As Sheet = oDoc.ActiveSheet Dim oView As DrawingView = oSheet.DrawingViews.Item(1) Dim viewname As String = oView.Name 'get view name Dim MainSheet = ThisDrawing.ActiveSheet'Sheets.ItemByName("HYD-A4:1") Dim VIEW1 = MainSheet.DrawingViews.ItemByName(viewname) 'Dim FirstGrooveFace1 = VIEW1.GetIntent("FirstGrooveFace", nearPoint := VIEW1.SheetPoint(1, 0)) 'Dim FirstGrooveFace2 = VIEW1.GetIntent("FirstGrooveFace", nearPoint := VIEW1.SheetPoint(1, 1)) Dim FirstGrooveFace1 = VIEW1.GetIntent("FirstGrooveFace", PointIntentEnum.kTopLeftPointIntent) Dim FirstGrooveFace2 = VIEW1.GetIntent("FirstGrooveFace", PointIntentEnum.kBottomLeftPointIntent) Dim genDims = MainSheet.DrawingDimensions.GeneralDimensions ThisDrawing.BeginManage() If True Then Dim FirstGrooveFaceDia = genDims.AddLinear("FirstGrooveFaceDia", VIEW1.SheetPoint(0.7, 0.5), FirstGrooveFace1, FirstGrooveFace2, , , False) : FirstGrooveFaceDia.NativeEntity.Text.FormattedText = "<DimensionValue/><br/>(BOTTOM OF GROOVE)" End If ThisDrawing.EndManage()
I suspect my error is to do with my intents not being explicit:
Many thanks,
Harvey
Solved! Go to Solution.