<?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 InserImage into any cell in ViewSchedule Table Header and simple Image Import in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/6588519#M62748</link>
    <description>&lt;P&gt;Good morning colleagues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody suggest how to insert an image into a cell in ViewSchedule Table Header? More precisely, how to import an image into project before you paste the image into a ViewSchedule Table Header cell?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can, then tell me that out of himself, in more detail, is a method of Document.Import!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I can not properly import the image:&lt;BR /&gt;1. I have an object ViewShedule&lt;BR /&gt;2. Inside this object there is a table&lt;BR /&gt;3. In the header&amp;nbsp;of the table has cells&lt;BR /&gt;4. It is necessary to programmatically insert an image in a cell&lt;BR /&gt;5. To insert an image in a cell, it must first be uploaded / imported in the project&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: how to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not understand that I am required to import method, which has the input parameters:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. &lt;STRONG&gt;file As String&lt;/STRONG&gt; - I understand it!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. &lt;STRONG&gt;options As Autodesk.Revit.DB.ImageImportOptions&lt;/STRONG&gt; - I do not understand !!! What do these options mean? How to create this object is clear to me (Dim options As New Autodesk.Revit.DB.ImageImportOptions).But that is where you can write down - I want to know?!&amp;nbsp;If at all there is something we need to record ...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. &lt;STRONG&gt;view As Autodesk.Revit.DB.View&lt;/STRONG&gt; - I do not understand !!!&amp;nbsp;What is the object I should point out here? It should be my ViewShedule object or something else?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;4. &lt;STRONG&gt;ByRef element As Autodesk.Revit.DB.Element&lt;/STRONG&gt; - I do not understand at all !!! What element I suposed to use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, help me to understand this moment.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2016 05:06:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-28T05:06:42Z</dc:date>
    <item>
      <title>InserImage into any cell in ViewSchedule Table Header and simple Image Import</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/6588519#M62748</link>
      <description>&lt;P&gt;Good morning colleagues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody suggest how to insert an image into a cell in ViewSchedule Table Header? More precisely, how to import an image into project before you paste the image into a ViewSchedule Table Header cell?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can, then tell me that out of himself, in more detail, is a method of Document.Import!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I can not properly import the image:&lt;BR /&gt;1. I have an object ViewShedule&lt;BR /&gt;2. Inside this object there is a table&lt;BR /&gt;3. In the header&amp;nbsp;of the table has cells&lt;BR /&gt;4. It is necessary to programmatically insert an image in a cell&lt;BR /&gt;5. To insert an image in a cell, it must first be uploaded / imported in the project&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: how to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not understand that I am required to import method, which has the input parameters:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. &lt;STRONG&gt;file As String&lt;/STRONG&gt; - I understand it!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. &lt;STRONG&gt;options As Autodesk.Revit.DB.ImageImportOptions&lt;/STRONG&gt; - I do not understand !!! What do these options mean? How to create this object is clear to me (Dim options As New Autodesk.Revit.DB.ImageImportOptions).But that is where you can write down - I want to know?!&amp;nbsp;If at all there is something we need to record ...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. &lt;STRONG&gt;view As Autodesk.Revit.DB.View&lt;/STRONG&gt; - I do not understand !!!&amp;nbsp;What is the object I should point out here? It should be my ViewShedule object or something else?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;4. &lt;STRONG&gt;ByRef element As Autodesk.Revit.DB.Element&lt;/STRONG&gt; - I do not understand at all !!! What element I suposed to use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, help me to understand this moment.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 05:06:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/6588519#M62748</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-28T05:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: InserImage into any cell in ViewSchedule Table Header and simple Image Impor</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/6596038#M62749</link>
      <description>&lt;P&gt;Dear Evgeniy Pashin,&lt;BR /&gt;&lt;BR /&gt;1: The Document.Import(string file, ImageImportOptions options, View view, out Element element) has no any problem to import image to project; From UI, we can insert image via Insert Tab\Import Panel\Image, the Import API just does what UI does.&lt;BR /&gt;&lt;BR /&gt;2: If you want to insert image to TableCell, you should consider another API: TableSectionCell.InsertImage(); besides, to insert image, you should build one ImageType firstly; following code demonstrates how to achieve this:&lt;/P&gt;
&lt;PRE&gt;		/// &amp;lt;summary&amp;gt;
		/// Builds one ImageType and then import it to schedule cell.
		/// &amp;lt;/summary&amp;gt;
		public void InsertImage2Schedule()
		{
			// build one ImageType from image in disk
			Document revitDoc = this.ActiveUIDocument.Document;
			ElementId imageId = ElementId.InvalidElementId;
			using(Transaction tran = new Transaction(revitDoc, "Image Type"))
			{
				tran.Start();
				ImageType imageTpe = ImageType.Create(revitDoc, "C:\\ThumbNail.jpg");
				imageId = imageTpe.Id;
				tran.Commit();
			}
			//
			// insert this image to schedule cell 
			ViewSchedule vs = this.ActiveUIDocument.ActiveView as ViewSchedule;
			TableData td = vs.GetTableData();
			TableSectionData tsd = td.GetSectionData(0);
			if(tsd.IsValidImageSymbolId(imageId))
			{
				using(Transaction tran = new Transaction(revitDoc, "Insert Image"))
				{
					tran.Start();
					tsd.InsertImage(0, 0, imageId);
					tran.Commit();
				}
			}
		}&lt;/PRE&gt;</description>
      <pubDate>Sat, 01 Oct 2016 03:58:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/6596038#M62749</guid>
      <dc:creator>JimJia</dc:creator>
      <dc:date>2016-10-01T03:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: InserImage into any cell in ViewSchedule Table Header and simple Image Impor</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/6597779#M62750</link>
      <description>Thank you very much!!!&lt;BR /&gt;&lt;BR /&gt;It works!!!</description>
      <pubDate>Mon, 03 Oct 2016 10:10:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/6597779#M62750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-03T10:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: InserImage into any cell in ViewSchedule Table Header and simple Image Impor</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/9375560#M62751</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I see you can set a cells imagesymbolid, but any clues how to get the&amp;nbsp;imagesymbolid?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 23:55:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/inserimage-into-any-cell-in-viewschedule-table-header-and-simple/m-p/9375560#M62751</guid>
      <dc:creator>david_rock</dc:creator>
      <dc:date>2020-03-12T23:55:26Z</dc:date>
    </item>
  </channel>
</rss>

