<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iLogic annotation placement in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9677418#M59875</link>
    <description>&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;If it works for you without errors, and creates the dimension,&amp;nbsp; then you we can figure out splitting it up into subs if you want.&amp;nbsp; It was just too complex and had too many variables without values the way it was.&lt;/P&gt;&lt;P&gt;I can't test it because I don't have the files.&amp;nbsp; If you run into some errors, we may have to put a lot more checks in there to make sure it is finding the values to the variables were trying to use, such as the drawing, assembly, sheet, view, work points, center mark styles, etc.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main 'Workpoints
	Dim oDDoc As DrawingDocument = ThisDrawing.Document
	Dim oStyleMgr As DrawingStylesManager = oDDoc.StylesManager
	Dim oADoc As AssemblyDocument = ThisDrawing.ModelDocument
	Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
	Dim oCMStyle As CentermarkStyle = oStyleMgr.CentermarkStyles.Item("Center Mark (ANSI)")
	Dim oSheet As Sheet = oDDoc.Sheets.Item(1)
	Dim oView As DrawingView
	For Each oDView As DrawingView In oSheet.DrawingViews
		If oDView.Name.Contains("View2") Then
			oView = oDView
		End If
	Next
	Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
	Dim oWP1 As WorkPoint = oADef.WorkPoints.Item("PS1")
	Dim oWP2 As WorkPoint = oADef.WorkPoints.Item("PE1")
	Dim oCP1 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP1, oView)
	Dim oCP2 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP2, oView)
	Dim oInt1 As GeometryIntent = oSheet.CreateGeometryIntent(oCP1)
	Dim oInt2 As GeometryIntent = oSheet.CreateGeometryIntent(oCP2)
	Dim oPtText As Point2d
	Dim oDimType As DimensionTypeEnum
	Dim oHorV As String = "Horizontal" 'or "Vertical"
	If oHorV = "Horizontal" Then
		oDimType = DimensionTypeEnum.kHorizontalDimensionType
		oPtText = oTG.CreatePoint2d(oView.Center.X,(oView.Top + 1))
	Else
		oDimType = DimensionTypeEnum.kVerticalDimensionType
		oPtText = oTG.CreatePoint2d((oView.Left-1),oView.Center.Y)
	End If
	Dim oDim As DrawingDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, oDimType)
End Sub&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 06 Aug 2020 18:00:41 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2020-08-06T18:00:41Z</dc:date>
    <item>
      <title>iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9674654#M59871</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the following code, it runs but it doesn't place a annotation,&lt;/P&gt;&lt;P&gt;I have adjusted quite a few things but can't figure out what i'm doing wrong, i think it's something small and is to be found in the first half of the code.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;more info: my sheetname in the dwg is 'MAIN'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Public Sub WorkPoints
	
	Dim oDrawingDoc As DrawingDocument = ThisApplication.ActiveDocument
	Dim oStyle As DrawingStylesManager = oDrawingDoc.StylesManager
	Dim oAssyDoc As AssemblyDocument = oDrawingDoc.AllReferencedDocuments.Item(1)
	Dim oAssyCompDef As AssemblyComponentDefinition = oAssyDoc.ComponentDefinitions.Item(1)
	Dim oCMStyle As CentermarkStyle = oStyle.CentermarkStyles.Item("Center Mark (ANSI)")
	
'*Define workpoint arrays
Dim sDimPt(2, 1) As String
		Dim Pt1 As Integer = 0

'*Define annotation start point
	sDimPt(0, Pt1) = "PS1"

'*Define annotation end points
	sDimPt(0, Pt2) = "PE1"

'*Define the views on which the annotation should be placed
	sDimPt(0, Pt3) = "View2"

'*Define sheet on which annotation should be placed
	sDimPt(0, Pt4) = "1"

'*Define annotation orientation
	sDimPt(0, Pt5) = "Horizontal"

'*Loop array to place
For j = 0 To 1
		sDimPt1 = sDimPt(j, Pt1)
		sDimPt2 = sDimPt(j, Pt2)
		viewName = sDimPt(j, Pt3)
		sheetIndex = CInt(sDimPt(j, Pt4))
		ActiveSheet = ThisDrawing.Sheet("MAIN:" &amp;amp; sheetIndex)

Dim oView As DrawingView = ActiveSheet.View(viewName).View
Dim oSheet As Sheet = oDrawingDoc.Sheets.Item(sheetIndex)
		CreateLinearDimension(oAssyCompDef, oView, oDrawingDoc, oSheet, sDimPt1, sDimPt2, oCMStyle, oDimType)
Next j
End Sub




'*iLogic automation annotation placement//////////////////////////////////////////////////////////////////////


Private Sub CreateLinearDimension(ByVal oAssyCompDef As AssemblyComponentDefinition, oView As DrawingView, oDrawingDoc As DrawingDocument, oSheet As Sheet, sDimPt1 As String, sDimPt2 As String, oCMStyle As CentermarkStyle, oDimType As String)
	Dim oTG As TransientGeometry
	oTG = ThisApplication.TransientGeometry
	
	'---------Get Assembly Workpoints as Sheetpoints---------
	oWP1 = oAssyCompDef.WorkPoints.Item(sDimPt1)
	oWP2 = oAssyCompDef.WorkPoints.Item(sDimPt2)
	
	'---------Declare variables for Dimeensions endpoints and text location---------
	Dim oSheetPt1 As Point2d
	Dim oSheetPt2 As Point2d
	Dim oPtText As Point2d
	
	'---------Add Centermarks on the drawing attached to the assemblu workpoints for geometry intent---------
	Dim oCenterMark1 As Centermark
	Dim oCenterMark2 As Centermark

	'---------Create Geometry intent---------
	Dim oGeomIntent1 As GeometryIntent
	Dim oGeomIntent2 As GeometryIntent
	oGeomIntent1 = oSheet.CreateGeometryIntent(oCenterMark1, oSheetPoint1)
	oGeomIntent2 = oSheet.CreateGeometryIntent(oCenterMark2, oSheetPoint2)
	
	'---------Define Dimension Text Location---------
	Dim oPlaceDimX As Double
	Dim oPlaceDimY As Double
	
		If oDimType = "Vertical" Then
			oPlaceDimX = oSheetPt1.X 
			oPlaceDimY = oSheetPt1.Y
				dimTypeVal = 60163
			
			Else If oDimType = "Horizontal" Then
				oPlaceDimX = oSheetPt1.X
				oPlaceDimY = oSheetPt1.Y 
					dimTypeVal = 60162
				End If
				
	oPtText = oTG.CreatePoint2d(oPlaceDimX, oPlaceDimY0)
	
		'---------Create Dimension And center the text between the leaders---------
		Dim oDimension As DrawingDimension
			oDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, dimTypeVal)
			
		End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 14:52:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9674654#M59871</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-05T14:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9675111#M59872</link>
      <description>&lt;P&gt;I see where you defined the variable "Pt1" but I don't see where you've defined the variables "Pt2", "Pt3", "Pt4", or "Pt5", before trying to use them within the "sDimPt()" array of string, assignments.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 17:59:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9675111#M59872</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-05T17:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9675128#M59873</link>
      <description>&lt;P&gt;Also I do you know that your line of code near the top "Dim sDimPt(2,1) As String" is creating a 2-dimensional array of strings that has 3 columns, and 2 rows?&amp;nbsp; When dealing with arrays, 0 is always counted as the first item in each dimension of it.&amp;nbsp; So there are 6 possible places to put a String within that array.&amp;nbsp; Unlike lists and collections, array's also have a set size, based on how you first call it out, so it's not easy (but not impossible) to add more items into it than its initial size allows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 18:08:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9675128#M59873</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-05T18:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9676367#M59874</link>
      <description>&lt;P&gt;Thank you, i wasn't fully aware how the multidimensional arrays worked.&lt;/P&gt;&lt;P&gt;I still don't get the dimension i want, but i corrected the code from what you pointed out below.&lt;/P&gt;&lt;P&gt;&lt;U&gt;If anyone could help me solve this further that would be greatly appreciated.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Public Sub WorkPoints
	
	Dim oDrawingDoc As DrawingDocument = ThisApplication.ActiveDocument
	Dim oStyle As DrawingStylesManager = oDrawingDoc.StylesManager
	Dim oAssyDoc As AssemblyDocument = oDrawingDoc.AllReferencedDocuments.Item(1)
	Dim oAssyCompDef As AssemblyComponentDefinition = oAssyDoc.ComponentDefinitions.Item(1)
	Dim oCMStyle As CentermarkStyle = oStyle.CentermarkStyles.Item("Center Mark (ANSI)")
	
'--------------------------------------------------

Dim sDimPt(2, 5) As String
		Dim Pt1 As Integer = 0
		Dim Pt2 As Integer = 1
		Dim Pt3 As Integer = 2
		Dim Pt4 As Integer = 3
		Dim Pt5 As Integer = 4

'*Define annotation start point
	sDimPt(0, Pt1) = "PS1"

'*Define annotation end points
	sDimPt(0, Pt2) = "PE1"

'*Define the views on which the annotation should be placed
	sDimPt(0, Pt3) = "View2"

'*Define sheet on which annotation should be placed
	sDimPt(0, Pt4) = "1"


'*Define annotation orientation
	sDimPt(0, Pt5) = "Horizontal"
	sDimPt(0, Pt5) = "Vertical"

'*Loop array 
For j = 0 To 1
		sDimPt1 = sDimPt(j, Pt1)
		sDimPt2 = sDimPt(j, Pt2)
		viewName = sDimPt(j, Pt3)
		sheetIndex = CInt(sDimPt(j, Pt4))
		ActiveSheet = ThisDrawing.Sheet("View2:" &amp;amp; sheetIndex)

Dim oView As DrawingView = ActiveSheet.View(viewName).View
Dim oSheet As Sheet = oDrawingDoc.Sheets.Item(sheetIndex)
		CreateLinearDimension(oAssyCompDef, oView, oDrawingDoc, oSheet, sDimPt1, sDimPt2, oCMStyle, oDimType)
Next j
End Sub



'annotation placement ---------------------------------

Private Sub CreateLinearDimension(ByVal oAssyCompDef As AssemblyComponentDefinition, oView As DrawingView, oDrawingDoc As DrawingDocument, oSheet As Sheet, sDimPt1 As String, sDimPt2 As String, oCMStyle As CentermarkStyle, oDimType As String)
	Dim oTG As TransientGeometry
	oTG = ThisApplication.TransientGeometry
	
	'---------Get Assembly Workpoints as Sheetpoints---------
	oWP1 = oAssyCompDef.WorkPoints.Item(sDimPt1)
	oWP2 = oAssyCompDef.WorkPoints.Item(sDimPt2)
	
	'---------Declare variables for Dimeensions endpoints and text location---------
	Dim oSheetPt1 As Point2d
	Dim oSheetPt2 As Point2d
	Dim oPtText As Point2d
	
	'---------Add Centermarks on the drawing attached to the assemblu workpoints for geometry intent---------
	Dim oCenterMark1 As Centermark
	Dim oCenterMark2 As Centermark

	'---------Create Geometry intent---------
	Dim oGeomIntent1 As GeometryIntent
	Dim oGeomIntent2 As GeometryIntent
	oGeomIntent1 = oSheet.CreateGeometryIntent(oCenterMark1, oSheetPoint1)
	oGeomIntent2 = oSheet.CreateGeometryIntent(oCenterMark2, oSheetPoint2)
	
	'---------Define Dimension Text Location---------
	Dim oPlaceDimX As Double
	Dim oPlaceDimY As Double
	
		If oDimType = "Vertical" Then
			oPlaceDimX = oSheetPt1.X - 2
			oPlaceDimY = oSheetPt1.Y
				dimTypeVal = 60163
			
			Else If oDimType = "Horizontal" Then
				oPlaceDimX = oSheetPt1.X
				oPlaceDimY = oSheetPt1.Y + 2
					dimTypeVal = 60162
				End If
				
	oPtText = oTG.CreatePoint2d(oPlaceDimX, oPlaceDimY0)
	
		'---------Create Dimension And center the text between the leaders---------
		Dim oDimension As DrawingDimension
			oDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, dimTypeVal)
			
		End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My workpoints inside my assembly:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_0-1596706905569.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/804049i36A103313EA00B3B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daan_M_0-1596706905569.png" alt="Daan_M_0-1596706905569.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My sheet:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_1-1596706948941.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/804050i4EF6B6285020DCAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Daan_M_1-1596706948941.png" alt="Daan_M_1-1596706948941.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 09:50:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9676367#M59874</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-06T09:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9677418#M59875</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;If it works for you without errors, and creates the dimension,&amp;nbsp; then you we can figure out splitting it up into subs if you want.&amp;nbsp; It was just too complex and had too many variables without values the way it was.&lt;/P&gt;&lt;P&gt;I can't test it because I don't have the files.&amp;nbsp; If you run into some errors, we may have to put a lot more checks in there to make sure it is finding the values to the variables were trying to use, such as the drawing, assembly, sheet, view, work points, center mark styles, etc.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main 'Workpoints
	Dim oDDoc As DrawingDocument = ThisDrawing.Document
	Dim oStyleMgr As DrawingStylesManager = oDDoc.StylesManager
	Dim oADoc As AssemblyDocument = ThisDrawing.ModelDocument
	Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
	Dim oCMStyle As CentermarkStyle = oStyleMgr.CentermarkStyles.Item("Center Mark (ANSI)")
	Dim oSheet As Sheet = oDDoc.Sheets.Item(1)
	Dim oView As DrawingView
	For Each oDView As DrawingView In oSheet.DrawingViews
		If oDView.Name.Contains("View2") Then
			oView = oDView
		End If
	Next
	Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
	Dim oWP1 As WorkPoint = oADef.WorkPoints.Item("PS1")
	Dim oWP2 As WorkPoint = oADef.WorkPoints.Item("PE1")
	Dim oCP1 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP1, oView)
	Dim oCP2 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP2, oView)
	Dim oInt1 As GeometryIntent = oSheet.CreateGeometryIntent(oCP1)
	Dim oInt2 As GeometryIntent = oSheet.CreateGeometryIntent(oCP2)
	Dim oPtText As Point2d
	Dim oDimType As DimensionTypeEnum
	Dim oHorV As String = "Horizontal" 'or "Vertical"
	If oHorV = "Horizontal" Then
		oDimType = DimensionTypeEnum.kHorizontalDimensionType
		oPtText = oTG.CreatePoint2d(oView.Center.X,(oView.Top + 1))
	Else
		oDimType = DimensionTypeEnum.kVerticalDimensionType
		oPtText = oTG.CreatePoint2d((oView.Left-1),oView.Center.Y)
	End If
	Dim oDim As DrawingDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, oDimType)
End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 06 Aug 2020 18:00:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9677418#M59875</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-06T18:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9678463#M59876</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;i added your newly suggested code to the drawing template document, when i put the addembly model views in and run the code i get the following message;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_0-1596788623032.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/804510i597DABF23859DFA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Daan_M_0-1596788623032.png" alt="Daan_M_0-1596788623032.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess that means something is failing when trying to add the linear dimension? correct me if i'm wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 08:25:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9678463#M59876</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-07T08:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9678943#M59877</link>
      <description>&lt;P&gt;Try this version now.&lt;/P&gt;&lt;P&gt;I've added a ton of checks and Try..Catch statements, that will hopefully give us more information about where something is going wrong for you.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'Drawing Document
If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("This rule '" &amp;amp; iLogicVb.RuleName &amp;amp; "' only works for Drawing Documents.",vbOKOnly, "WRONG DOCUMENT TYPE")
	Return
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
If oDDoc Is Nothing Then MsgBox("No Active Drawing Document Found. Exiting.") : Return

'Model Document
If ThisDrawing.ModelDocument Is Nothing Then
	MsgBox("There is no model document associated with this drawing. Exiting.", vbOKOnly + vbExclamation, " ")
	Return
End If
Dim oMDocType As DocumentTypeEnum = ThisDrawing.ModelDocument.DocumentType
Dim oADoc As AssemblyDocument
Dim oADef As AssemblyComponentDefinition
If oMDocType = DocumentTypeEnum.kAssemblyDocumentObject Then
	oADoc = ThisDrawing.ModelDocument
	oADef = oADoc.ComponentDefinition
Else
	MsgBox("The main model file being reference by this drawing is not an assembly." &amp;amp; vbCrLf &amp;amp; _
	"This rule only works when the model is an assembly document. Exiting.", vbOKOnly + vbExclamation, " ")
	Return
End If

Dim oSheet As Sheet = oDDoc.Sheets.Item(1)
Dim oView As DrawingView
For Each oDView As DrawingView In oSheet.DrawingViews
	If oDView.Name.Contains("View2") Then
		oView = oDView
	End If
Next
If oView Is Nothing Then
	MsgBox("Couln't find a sheet with 'View2' in its name. Exiting.", vbOKOnly + vbExclamation, "VIEW NOT FOUND")
	Return
End If
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry

Dim oWP1 As WorkPoint
Dim oWP2 As WorkPoint
Try
	oWP1 = oADef.WorkPoints.Item("PS1")
	oWP2 = oADef.WorkPoints.Item("PE1")
Catch oEx As Exception
	MsgBox("Couldn't find WorkPoints named 'PS1' &amp;amp; 'PE1'. Exiting.")
	Return
End Try

Dim oStyleMgr As DrawingStylesManager = oDDoc.StylesManager
Dim oCMStyle As CentermarkStyle
Try
	oCMStyle = oStyleMgr.CentermarkStyles.Item("Center Mark (ANSI)")
Catch oEx As Exception
	oProceed = MsgBox("Coundn't find a CentermarkStyle named 'Center Mark (ANSI)'." &amp;amp; vbCrLf &amp;amp; _
	"Do you want to proceed without specifying the Style?", vbYesNo + vbQuestion, "STYLE NOT FOUND")
	If oProceed = vbNo Then Return
End Try
Dim oCP1 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP1, oView, oCMStyle)
Dim oCP2 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP2, oView, oCMStyle)

Dim oInt1 As GeometryIntent = oSheet.CreateGeometryIntent(oCP1)
Dim oInt2 As GeometryIntent = oSheet.CreateGeometryIntent(oCP2)
Dim oPtText As Point2d
Dim oDimType As DimensionTypeEnum
Dim oHorV As String = "Horizontal" 'or "Vertical"
If oHorV = "Horizontal" Then
	oDimType = DimensionTypeEnum.kHorizontalDimensionType
	oPtText = oTG.CreatePoint2d(oView.Center.X,(oView.Top + 1))
Else
	oDimType = DimensionTypeEnum.kVerticalDimensionType
	oPtText = oTG.CreatePoint2d((oView.Left-1),oView.Center.Y)
End If
Dim oDim As DrawingDimension
Try
	oDim = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, oDimType)
Catch oEx As Exception
	MsgBox("The attempt to create the dimension failed." &amp;amp; vbCrLf &amp;amp; _
	"The Error message is as follows:" &amp;amp; vbCrLf &amp;amp; _
	oEx.Message &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; _
	"The Source is as follows:" &amp;amp; vbCrLf &amp;amp; _
	oEx.Source, vbOKOnly + vbExclamation, " ")
End Try
	&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 07 Aug 2020 12:48:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9678943#M59877</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-07T12:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9679212#M59878</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your dedication in helping me out, your error checks isolate the problem to the position stated below, unfortunately it does not come up with a source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i comment the code below out, the rule runs smoothly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'oDim = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, oDimType)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_0-1596809937701.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/804816i03E5CA7A911940E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daan_M_0-1596809937701.png" alt="Daan_M_0-1596809937701.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Might have to do something with the 2D point?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 14:32:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9679212#M59878</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-07T14:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9679869#M59879</link>
      <description>&lt;P&gt;Just a thought. I am not at my PC to test this but you are defining &lt;STRONG&gt;oDim&lt;/STRONG&gt; as a &lt;STRONG&gt;DrawingDimension&lt;/STRONG&gt;. While it is the parent class, you might find better success defining it as &lt;STRONG&gt;GeneralDimension&lt;/STRONG&gt; instead since &lt;STRONG&gt;DrawingDimension&lt;/STRONG&gt; does not have an &lt;STRONG&gt;AddLinear&lt;/STRONG&gt; method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDim As DrawingDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, oDimType)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;so like this&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDim As GeneralDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oGeomIntent1, oGeomIntent2, oDimType)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try to test this out myself after the weekend. If you get a chance to test it before then, please post your findings.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 20:27:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9679869#M59879</guid>
      <dc:creator>tfrohe_LSI</dc:creator>
      <dc:date>2020-08-07T20:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9680462#M59880</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4841739"&gt;@tfrohe_LSI&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;, no succes yet, made a simple Part to test with, see added files.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Aug 2020 13:34:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9680462#M59880</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-08T13:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9681982#M59881</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;: Great solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176"&gt;@JhoelForshav&lt;/a&gt;&amp;nbsp;noticed the following; "I see however that your geometry intent variables are called oInt1 and oInt2, but in your line to add the dimension you use oGeomIntent1 and oGeomIntent2 that are not declared anywhere in the code."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It runs perfectly now, thanks alot!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 08:50:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9681982#M59881</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-10T08:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682200#M59882</link>
      <description>&lt;P&gt;Wow, you're right. &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt; That's the kind of simple stuff you miss when you can't test the code before you post it.&lt;/P&gt;&lt;P&gt;So is this code working for you now?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'Drawing Document
If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("This rule '" &amp;amp; iLogicVb.RuleName &amp;amp; "' only works for Drawing Documents.",vbOKOnly, "WRONG DOCUMENT TYPE")
	Return
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
If oDDoc Is Nothing Then MsgBox("No Active Drawing Document Found. Exiting.") : Return

'Model Document
If ThisDrawing.ModelDocument Is Nothing Then
	MsgBox("There is no model document associated with this drawing. Exiting.", vbOKOnly + vbExclamation, " ")
	Return
End If
Dim oMDocType As DocumentTypeEnum = ThisDrawing.ModelDocument.DocumentType
Dim oADoc As AssemblyDocument
Dim oADef As AssemblyComponentDefinition
If oMDocType = DocumentTypeEnum.kAssemblyDocumentObject Then
	oADoc = ThisDrawing.ModelDocument
	oADef = oADoc.ComponentDefinition
Else
	MsgBox("The main model file being reference by this drawing is not an assembly." &amp;amp; vbCrLf &amp;amp; _
	"This rule only works when the model is an assembly document. Exiting.", vbOKOnly + vbExclamation, " ")
	Return
End If

Dim oSheet As Sheet = oDDoc.Sheets.Item(1)
Dim oView As DrawingView
For Each oDView As DrawingView In oSheet.DrawingViews
	If oDView.Name.Contains("View2") Then
		oView = oDView
	End If
Next
If oView Is Nothing Then
	MsgBox("Couln't find a sheet with 'View2' in its name. Exiting.", vbOKOnly + vbExclamation, "VIEW NOT FOUND")
	Return
End If
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry

Dim oWP1, oWP2 As WorkPoint
Try
	oWP1 = oADef.WorkPoints.Item("PS1")
	oWP2 = oADef.WorkPoints.Item("PE1")
Catch oEx As Exception
	MsgBox("Couldn't find WorkPoints named 'PS1' &amp;amp; 'PE1'. Exiting.")
	Return
End Try

Dim oStyleMgr As DrawingStylesManager = oDDoc.StylesManager
Dim oCMStyle As CentermarkStyle
Try
	oCMStyle = oStyleMgr.CentermarkStyles.Item("Center Mark (ANSI)")
Catch oEx As Exception
	oProceed = MsgBox("Coundn't find a CentermarkStyle named 'Center Mark (ANSI)'." &amp;amp; vbCrLf &amp;amp; _
	"Do you want to proceed without specifying the Style?", vbYesNo + vbQuestion, "STYLE NOT FOUND")
	If oProceed = vbNo Then Return
End Try
Dim oCP1 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP1, oView, oCMStyle)
Dim oCP2 As Centermark = oSheet.Centermarks.AddByWorkFeature(oWP2, oView, oCMStyle)

Dim oInt1 As GeometryIntent = oSheet.CreateGeometryIntent(oCP1)
Dim oInt2 As GeometryIntent = oSheet.CreateGeometryIntent(oCP2)
Dim oPtText As Point2d
Dim oDimType As DimensionTypeEnum
Dim oHorV As String = "Horizontal" 'or "Vertical"
If oHorV = "Horizontal" Then
	oDimType = DimensionTypeEnum.kHorizontalDimensionType
	oPtText = oTG.CreatePoint2d(oView.Center.X,(oView.Top + 1))
Else
	oDimType = DimensionTypeEnum.kVerticalDimensionType
	oPtText = oTG.CreatePoint2d((oView.Left-1),oView.Center.Y)
End If
Dim oDim As GeneralDimension
Try
	oDim = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oPtText, oInt1, oInt2, oDimType)
Catch oEx As Exception
	MsgBox("The attempt to create the dimension failed." &amp;amp; vbCrLf &amp;amp; _
	"The Error message is as follows:" &amp;amp; vbCrLf &amp;amp; _
	oEx.Message &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; _
	"The Source is as follows:" &amp;amp; vbCrLf &amp;amp; _
	oEx.Source, vbOKOnly + vbExclamation, " ")
End Try
	&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 10 Aug 2020 11:31:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682200#M59882</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-10T11:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682408#M59883</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp; Yes this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Small offtopic question, The code below works fine on my laptop, but on my desktop it fails...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Public Sub Main 

Dim KastVariant As String  = iPart.RowName("oTypeKast")
Dim MotorVariant as String = iPart.RowName("oTypeMotor")

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_1-1597065551465.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/805528iF49D5CFDDD3CE137/image-size/large?v=v2&amp;amp;px=999" role="button" title="Daan_M_1-1597065551465.png" alt="Daan_M_1-1597065551465.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like iLogic doesn't recognize the method, the text isnt purple and theres also no box that comes up to explain the arguments within it when i hoover my cursor over it, i haven't ran into this before&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:21:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682408#M59883</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-10T13:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682482#M59884</link>
      <description>&lt;P&gt;oTypeKast and oTypeMotor look like variable names.&amp;nbsp; If they are defined elsewhere within the main code block as a public or shared String?&amp;nbsp; If so, you can remove the quotation marks around them.&lt;/P&gt;&lt;P&gt;However, if they really are the direct names of components within your iPart table, they should work.&lt;/P&gt;&lt;P&gt;Do you have the Option "Straight VB code" turned on or off, within the iLogic Rule Editor dialog?&lt;/P&gt;&lt;P&gt;If it is off, and you're not planning on sharing this sub with another rule, you can get rid of the "Public" before Sub.&lt;/P&gt;&lt;P&gt;Public &amp;amp; Private are for when sharing the Sub/Function/etc. between multiple modules or rules.&lt;/P&gt;&lt;P&gt;Have you tried including a couple of MsgBox statements to check for the returned values?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:48:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682482#M59884</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-10T13:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682483#M59885</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8021187"&gt;@Daan_M&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at your screenshot, I see no reason for the code to fail. Sometimes however, It can be more stable to use API calls instead of iLogic functionality. Maybe this works better?&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Main&lt;/SPAN&gt; 
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oOccs&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;ComponentOccurrences&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Occurrences&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;KastVariant&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt;  = &lt;SPAN style="color: #800000;"&gt;oOccs&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ItemByName&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"oTypeKast"&lt;/SPAN&gt;).&lt;SPAN style="color: #800000;"&gt;Definition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;iPartMember&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Row&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;MemberName&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;MotorVariant&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oOccs&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ItemByName&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"oTypeMotor"&lt;/SPAN&gt;).&lt;SPAN style="color: #800000;"&gt;Definition&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;iPartMember&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Row&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;MemberName&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:48:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682483#M59885</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-08-10T13:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682502#M59886</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8021187"&gt;@Daan_M&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You also may need to include a check to see if the active document is has an iPart table to access.&lt;/P&gt;&lt;P&gt;This won't work from just any document, without either the active document or a specified document containing an iPart table to search in.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:53:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682502#M59886</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-10T13:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic annotation placement</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682576#M59887</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176"&gt;@JhoelForshav&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code doesn't work, same message.&lt;/P&gt;&lt;P&gt;The strangest thing is that iPart.ChangeRow works fine (the code below is from another rule, i added 'iPart.RowName' to it for testing);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;oTypeKast = GoExcel.CellValue(oExcelDoc, oSheet, "A1") 'import membername from Excel

iPart.ChangeRow("oTypeKast", oTypeKast) 'works fine
rowName = iPart.RowName("oTypeKast") 'doesnt work&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess this means iLogic does have acces to the table since it can change rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can find a way around the error&amp;nbsp; and link the Excel in my other rule aswell, and import it that way, like i did in the code above. I'm just curious to the cause of the error to help my understanding...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 14:21:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-annotation-placement/m-p/9682576#M59887</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-10T14:21:49Z</dc:date>
    </item>
  </channel>
</rss>

