<?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: Cann't add the border and titel block from Defind options in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8342681#M83098</link>
    <description>&lt;P&gt;Could you provide photo from your drawing resources (tree) ?&lt;/P&gt;&lt;P&gt;try : &amp;nbsp;&lt;/P&gt;&lt;P&gt;Set oBorder = oSheet.AddDefaultBorder()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also try :&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim oTitleBlockDef As TitleBlockDefinition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oTitleBlockDef = oDrawDoc.TitleBlockDefinitions.Item("DIN EN ISO 5457")&lt;BR /&gt;Dim sPromptStrings(1 To 2) As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sPromptStrings(1) = "String 1"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sPromptStrings(2) = "String 2"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Add an instance of the title block definition to the sheet.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oTitleBlock As TitleBlock&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oTitleBlock = oSheet.AddTitleBlock(oTitleBlockDef, , sPromptStrings)&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2018 09:33:21 GMT</pubDate>
    <dc:creator>marcin_otręba</dc:creator>
    <dc:date>2018-10-18T09:33:21Z</dc:date>
    <item>
      <title>Cann't add the border and titel block from Defind options</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8339670#M83093</link>
      <description>&lt;P&gt;Dear Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having the problem when I was coding. I would like to add the border and title block but can not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to fix this problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Imports Inventor&lt;BR /&gt;Public Class Form1&lt;/P&gt;&lt;P&gt;Dim invApp As Inventor.Application&lt;BR /&gt;Dim oDrawDoc As DrawingDocument&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Public Sub New()&lt;BR /&gt;' This call is required by the Windows Form Designer.&lt;BR /&gt;InitializeComponent()&lt;BR /&gt;' Add any initialization after the InitializeComponent() call.&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;BR /&gt;Try&lt;BR /&gt;'Attach to the Existing Runnin Inventor Application&lt;/P&gt;&lt;P&gt;invApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")&lt;/P&gt;&lt;P&gt;Catch ex As Exception&lt;/P&gt;&lt;P&gt;System.Windows.Forms.MessageBox.Show("Error: Inventor must be running...")&lt;/P&gt;&lt;P&gt;Exit Sub&lt;/P&gt;&lt;P&gt;End Try&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;oDrawDoc = invApp.Documents.Open("D:\OneDrive\OneCAD\ATC\Training Documents\Excercise File\Template\Template.idw", True)&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click&lt;/P&gt;&lt;P&gt;'Active bản vẽ hiện tại&lt;BR /&gt;oDrawDoc = invApp.ActiveDocument&lt;/P&gt;&lt;P&gt;'Open template sẵn có&lt;BR /&gt;Dim oSheet As Sheet&lt;BR /&gt;oSheet = oDrawDoc.Sheets.Add(DrawingSheetSizeEnum.kBDrawingSheetSize)&lt;/P&gt;&lt;P&gt;Dim oSheetActive As Sheet&lt;BR /&gt;oSheetActive = oDrawDoc.ActiveSheet&lt;/P&gt;&lt;P&gt;'Thêm một khung bản vẽ Custom DIN EN ISO 5457&lt;BR /&gt;Dim oBorderDef As Inventor.Border&lt;BR /&gt;oBorderDef = oSheetActive.AddBorder(oDrawDoc.BorderDefinitions.Item("DIN EN ISO 5457"))&lt;/P&gt;&lt;P&gt;'Thêm một khung tên custom DIN EN ISO 5457&lt;BR /&gt;Dim oTitleBlock As Inventor.TitleBlock&lt;BR /&gt;oTitleBlock = oSheetActive.AddTitleBlock(oDrawDoc.TitleBlockDefinitions.Item("DIN EN ISO 5457"))&lt;/P&gt;&lt;P&gt;End Sub&lt;BR /&gt;End Class&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 07:06:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8339670#M83093</guid>
      <dc:creator>ngocson8335</dc:creator>
      <dc:date>2018-10-17T07:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't add the border and titel block from Defind options</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8339917#M83094</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you provide samle of your drawing ?&amp;nbsp; i think problem is that you have some prompted inputs in your border/title block definitions.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 08:59:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8339917#M83094</guid>
      <dc:creator>marcin_otreba</dc:creator>
      <dc:date>2018-10-17T08:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't add the border and titel block from Defind options</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8339998#M83095</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is my file.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 09:37:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8339998#M83095</guid>
      <dc:creator>ngocson8335</dc:creator>
      <dc:date>2018-10-17T09:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't add the border and titel block from Defind options</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8342603#M83096</link>
      <description>&lt;P&gt;Hi sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you still working on this case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ngoc Son&lt;/P&gt;&lt;P&gt;Inventor's user&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 08:54:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8342603#M83096</guid>
      <dc:creator>ngocson8335</dc:creator>
      <dc:date>2018-10-18T08:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't add the border and titel block from Defind options</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8342612#M83097</link>
      <description>&lt;P&gt;sorry, but actually i use 2017 and i can't open your file.&lt;/P&gt;&lt;P&gt;But i'm almost sure that the problem is that you have some prompted entries.&amp;nbsp; Try to create simpole border even with one line, and simple titleblock. Then try to place it bu code and it will work.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 08:58:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8342612#M83097</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2018-10-18T08:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't add the border and titel block from Defind options</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8342681#M83098</link>
      <description>&lt;P&gt;Could you provide photo from your drawing resources (tree) ?&lt;/P&gt;&lt;P&gt;try : &amp;nbsp;&lt;/P&gt;&lt;P&gt;Set oBorder = oSheet.AddDefaultBorder()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also try :&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim oTitleBlockDef As TitleBlockDefinition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oTitleBlockDef = oDrawDoc.TitleBlockDefinitions.Item("DIN EN ISO 5457")&lt;BR /&gt;Dim sPromptStrings(1 To 2) As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sPromptStrings(1) = "String 1"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sPromptStrings(2) = "String 2"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Add an instance of the title block definition to the sheet.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oTitleBlock As TitleBlock&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oTitleBlock = oSheet.AddTitleBlock(oTitleBlockDef, , sPromptStrings)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:33:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8342681#M83098</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2018-10-18T09:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't add the border and titel block from Defind options</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8344908#M83099</link>
      <description>&lt;P&gt;Thank you for your suggested. I fixed it.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 06:14:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cann-t-add-the-border-and-titel-block-from-defind-options/m-p/8344908#M83099</guid>
      <dc:creator>ngocson8335</dc:creator>
      <dc:date>2018-10-19T06:14:17Z</dc:date>
    </item>
  </channel>
</rss>

