<?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: Creating a Detail View in drawing with iLogic in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/9694552#M114648</link>
    <description>&lt;P&gt;Thanks I've managed to place a detailview in the position and scale i want;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim DCP As Point2d
	DCP =  oV2Cm4.Position
	
	Dim DPPV As Double = (oSheet.Height - 15) 
	Dim DPPH As Double = (oSheet.Width - 25) 
 
	Dim DPP As Point2d 
        DPP = ThisApplication.TransientGeometry.CreatePoint2d(DPPH, DPPV) 

  	Dim oPointDetail As Point2d
    oPointDetail = oView2.Center
    oPointDetail.X = oPointDetail.X - 0.5 * oView2.Width
    
    Dim oDetailView As DetailDrawingView
    oDetailView = oSheet.DrawingViews.AddDetailView(oView2, DPP, kFromBaseDrawingViewStyle, True, DCP, 0.5, , oView2.Scale * 2, True, "A")
	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck at placing the &lt;U&gt;annotations&lt;/U&gt; on the detail view. I'm not sure how i should create the centermarks, for centermarks on my regular views i use;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oCMs As Centermarks = oSheet.Centermarks
For Each oDView As DrawingView In oSheet.DrawingViews
	
'----- Assign WPs to CMs for View1 -----	
	If 		oDView.Name.Contains("View1") Then
			oView1 = oDView
			
			oV1Cm1 = oCMs.AddByWorkFeature(oWP1, oView1) 	'KFI5
			oV1Cm2 = oCMs.AddByWorkFeature(oWP5, oView1) 	'KFI6&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the Inventor api object model a detail drawingview is different from a drawingview&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_0-1597647481180.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/807911i381DB535FD98DF54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daan_M_0-1597647481180.png" alt="Daan_M_0-1597647481180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried doing this but without succes;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;	
Dim oScm1, oScm2 As Centermark

			oScm1 = oCMs.AddByWorkFeature(oWP23, oDetailView) 
			oScm2 = oCMs.AddByWorkFeature(oWP24, oDetailView) 	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&lt;BR /&gt;at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp;amp; msgData)&lt;BR /&gt;at Inventor.Centermarks.AddByWorkFeature(Object WorkFeature, DrawingView DrawingView, Object CentermarkStyle, Object Layer)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;at ThisRule.Main()&lt;BR /&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;BR /&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2020 07:02:07 GMT</pubDate>
    <dc:creator>Daan_M</dc:creator>
    <dc:date>2020-08-17T07:02:07Z</dc:date>
    <item>
      <title>Creating a Detail View in drawing with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/9691428#M114587</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the title suggests, im trying to make iLogic create a Detail View, like so (done manually with UI);&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_0-1597407002827.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/807278i648DCA2AB6BE354A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daan_M_0-1597407002827.png" alt="Daan_M_0-1597407002827.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;	Dim oPointDetail As Point2d
    oPointDetail = oView2.Center
    oPointDetail.X = oPointDetail.X - 0.5 * oView2.Width
    
    Dim oCurveSeg As DrawingCurveSegment
    oCurveSeg = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Pick")
    Dim oCenterPoint As Point2d
    oCenterPoint = oCurveSeg.StartPoint

   
    Dim oDetailView As DetailDrawingView
    oDetailView = oSheet.DrawingViews.AddDetailView(oView2, oPointDetail, kFromBaseDrawingViewStyle, True, oCentrePoint, 1, , oView2.Scale * 3, True, "Detail A")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i ran into two problems:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;i get an error with the cause 'wrong paramater', after looking at it i found out why;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_2-1597407267701.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/807281iD2B2C4B455DD2AFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Daan_M_2-1597407267701.png" alt="Daan_M_2-1597407267701.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The property 'StartPoint' returns nothing when the selected DrawingCurveSegment is circular (which mine is).&lt;/P&gt;&lt;P&gt;How can i work around this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I use a manual picker to select a DrawingCurveSegment right now, which is fine for testing, but i want this automated. The segment i need a detail of is always the same, so the goal is to define that segment in my iLogic and assign it to oCurveseg&lt;/P&gt;&lt;LI-CODE lang="general"&gt;oCurveSeg = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Pick")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 12:19:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/9691428#M114587</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-14T12:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Detail View in drawing with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/9692360#M114620</link>
      <description>&lt;P&gt;Have you seen &lt;A href="https://adndevblog.typepad.com/manufacturing/2012/06/creating-a-drawing-from-scratch-with-the-inventor-api.html" target="_blank" rel="noopener"&gt;this&lt;/A&gt; post? It shows how to create a drawing from scratch inclusive creating a detail view.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 19:48:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/9692360#M114620</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2020-08-14T19:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Detail View in drawing with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/9694552#M114648</link>
      <description>&lt;P&gt;Thanks I've managed to place a detailview in the position and scale i want;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim DCP As Point2d
	DCP =  oV2Cm4.Position
	
	Dim DPPV As Double = (oSheet.Height - 15) 
	Dim DPPH As Double = (oSheet.Width - 25) 
 
	Dim DPP As Point2d 
        DPP = ThisApplication.TransientGeometry.CreatePoint2d(DPPH, DPPV) 

  	Dim oPointDetail As Point2d
    oPointDetail = oView2.Center
    oPointDetail.X = oPointDetail.X - 0.5 * oView2.Width
    
    Dim oDetailView As DetailDrawingView
    oDetailView = oSheet.DrawingViews.AddDetailView(oView2, DPP, kFromBaseDrawingViewStyle, True, DCP, 0.5, , oView2.Scale * 2, True, "A")
	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck at placing the &lt;U&gt;annotations&lt;/U&gt; on the detail view. I'm not sure how i should create the centermarks, for centermarks on my regular views i use;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oCMs As Centermarks = oSheet.Centermarks
For Each oDView As DrawingView In oSheet.DrawingViews
	
'----- Assign WPs to CMs for View1 -----	
	If 		oDView.Name.Contains("View1") Then
			oView1 = oDView
			
			oV1Cm1 = oCMs.AddByWorkFeature(oWP1, oView1) 	'KFI5
			oV1Cm2 = oCMs.AddByWorkFeature(oWP5, oView1) 	'KFI6&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the Inventor api object model a detail drawingview is different from a drawingview&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daan_M_0-1597647481180.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/807911i381DB535FD98DF54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daan_M_0-1597647481180.png" alt="Daan_M_0-1597647481180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried doing this but without succes;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;	
Dim oScm1, oScm2 As Centermark

			oScm1 = oCMs.AddByWorkFeature(oWP23, oDetailView) 
			oScm2 = oCMs.AddByWorkFeature(oWP24, oDetailView) 	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&lt;BR /&gt;at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp;amp; msgData)&lt;BR /&gt;at Inventor.Centermarks.AddByWorkFeature(Object WorkFeature, DrawingView DrawingView, Object CentermarkStyle, Object Layer)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;at ThisRule.Main()&lt;BR /&gt;at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;BR /&gt;at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 07:02:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/9694552#M114648</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-08-17T07:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Detail View in drawing with iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/12653623#M165154</link>
      <description>&lt;P&gt;For&amp;nbsp; anyone trying to recreate this now, there is an error in line 12 that was preventing this code from working for me: "centre" should be "center"&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 14:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/creating-a-detail-view-in-drawing-with-ilogic/m-p/12653623#M165154</guid>
      <dc:creator>ppolcynBNVFN</dc:creator>
      <dc:date>2024-03-20T14:12:30Z</dc:date>
    </item>
  </channel>
</rss>

