Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using iLogic to place dimension's in a drawing and this all works good as long as the part is in the assembly or placed by itself.
The problem I am having is that the part I'm trying to get the intent from is in a sub assembly.
I don't know how I can get down down one more level to get the surface intent I'm looking for.
Below is the rule I have so far.
'-----THIS RULE IS FOR THE DIMENSIONS, CENTER MARKS & BALLOONS FOR SHEET SINGLE SLEEVE GASKET:4 '---THIS IS TO DEFINE THE SHEET THE RULES APPLY TO. Dim SSGSheet = ThisDrawing.Sheets.ItemByName("SINGLE SLEEVE GASKET:4") Dim genDims = SSGSheet.DrawingDimensions.GeneralDimensions Dim holeThreadNotes = SSGSheet.DrawingNotes.HoleThreadNotes '-----THIS IS TO DEFINE THE DIMENSIONS NAMES AND NUMBERS '[ '---IT'S DEFINED BY A TEXT WITH AN AUTOMATIC NUMBER. Dim LDIMNAME As String = ("STP LINDIM ") '---THIS IS THE NAME OF THE LINEAR DIMENSIONS Dim LDIMNUMBER As Integer = 0 '---THIS IS THE COUNTER FOR THE LINEAR DIMENSION NUMBER Dim HDIMNAME As String = ("STP HDIM") '---THIS IS THE NAME OF THE HOLE DIMENSIONS Dim HDIMNUMBER As Integer = 0 '---THIS IS THE COUNTER FOR THE HOLE DIMENSION NUMBER Dim RDIMNAME As String = ("STP RDIM") '---THIS IS THE NAME OF THE RADIUS DIMENSIONS Dim RDIMNUMBER As Integer = 0 '---THIS IS THE COUNTER FOR THE RADIUS DIMENSION NUMBER Dim HTNNAME As String = ("STP HTNDIM") '---THIS IS THE NAME OF THE HOLE THREAD NOTE DIMENSIONS Dim HTNNUMBER As Integer = 0 '---THIS IS THE COUNTER FOR THE HOLE THREAD NOTE NUMBER Dim ADIMNAME As String = ("STP AINDIM ") '---THIS IS THE NAME OF THE ANGULAR DIMENSIONS Dim ADIMNUMBER As Integer = 0 '---THIS IS THE COUNTER FOR THE ANGULAR DIMENSION NUMBER '] '---THIS IS TO DEFINE THE DIMENSION STYLES USED WHEN PLACING DIMENSIONS. '[ Dim oDrawDoc As DrawingDocument = ThisDoc.Document Dim oSheet As Sheet = oDrawDoc.ActiveSheet Dim oStylesMgr As DrawingStylesManager = oDrawDoc.StylesManager 'get the reference to the target dimension style (by name) Dim oNewStyle As DimensionStyle = oStylesMgr.DimensionStyles.Item("HMT DEFAULT") '---THIS IS THE NORMAL DIM STYLE Dim oNewStyle01 As DimensionStyle = oStylesMgr.DimensionStyles.Item("RAD 2x") '---THIS HAS THE PREFIX 2x '] '-----THIS IS TO DEFINE ALL THE DIMENSIONS, CENTER MARK & BALLONS FOR VIEW A06.001.004 '[ Dim VIEW = SSGSheet.DrawingViews.ItemByName("GASKET") '---THIS IS THE VIEW NAME IN THE SHEET Dim PART As String = ("1 PIPE SLIDE GASKET") '---THIS IS THE INSTANT NAME OF THE PART IN THE VIEW Dim SUBASS As String = ("1 PIPE SLEEVE") '---THIS IS THE SUBASSEMBLY INSTANCE NAME '---THIS IS ALL THE LINEAR DIMENSIONS ON THE VIEW A06.001.004 '[ Dim SP01 = VIEW.GetIntent(PART, "OD") HDIMNUMBER = HDIMNUMBER + 1 Dim linDim = genDims.AddDiameter(HDIMNAME & HDIMNUMBER, VIEW.SheetPoint(1.0, 1.0), SP01)
The issue is when I'm getting the INTENT. I can only reference a part. I am referring to the part by it's instant name in the model tree. This works great normally but as this part is in a sub-assembly I can not get to it.
If someone has some tips or tricks to solve this the help would be highly appreciated.
Jarle
Solved! Go to Solution.