Message 1 of 5
iLogic - creating dimensions on section views
Not applicable
11-24-2016
12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a section view of a cylinder with 2 grooves (see figure below). I have managed to create dims a,b,c,d thru ilogic code (see code below). I also want to create the radius of each groove and the radius of the cylinder (r1, r2 and r3 in the figure), but I cant get it to work. I've tried identifying points on the drawing curve of each face, and then draw the dimension line from those, but I get error message. Please help me sort this out!
Another thing is that I don't have control of which side dims a,b,c,d appear on. How can I control whether the dimensions appear on the left side or the right side of the cylinder?
'Finds faces with attributes
aoAttributeSets = oAssyDoc.AttributeManager.FindAttributeSets("SectionViewA","Face*",sOeString)
iAttributeSetsCounter = aoAttributeSets.Count
Dim aoFacesSectionViewA(0 To iAttributeSetsCounter) As Face
For i=1 To iAttributeSetsCounter
oObjs = oAssyDoc.AttributeManager.FindObjects(
"SectionViewA",
"Face" & i,
sOeString)
aoFacesSectionViewA(i) = oObjs(1)
Next
'Finds the equivalent drawing curves on the section view
Dim aoDrawCurvesSectionViewA(0 To iAttributeSetsCounter) As DrawingCurve
For i = 1 To iAttributeSetsCounter
oDrawViewCurves = oSectionViewA.DrawingCurves(aoFacesSectionViewA(i))
aoDrawCurvesSectionViewA(i) = oDrawViewCurves.Item(1)
Next
'Draws dimensions
'Bearing groove width
oPtDim = oTG.CreatePoint2d(,oSectionViewA.Top + iDim_Space)
oDim = oGeneralDims.AddLinear(
oPtDim,
oSheet.CreateGeometryIntent(aoDrawCurvesSectionViewA(2)))
'Seal groove width
oPtDim = oTG.CreatePoint2d(,oSectionViewA.Top + iDim_Space)
oDim = oGeneralDims.AddLinear(
oPtDim,
oSheet.CreateGeometryIntent(aoDrawCurvesSectionViewA(3)))
'Seal groove height
oPtDim = oTG.CreatePoint2d(oSectionViewA.Left + oSectionViewA.Width + 2*iDim_Space,)
oDim = oGeneralDims.AddLinear(
oPtDim,
oSheet.CreateGeometryIntent(aoDrawCurvesSectionViewA(4)))
'Bearing groove height
oPtDim = oTG.CreatePoint2d(oSectionViewA.Left + oSectionViewA.Width + iDim_Space,)
oDim = oGeneralDims.AddLinear(
oPtDim,
oSheet.CreateGeometryIntent(aoDrawCurvesSectionViewA(5)))