<?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: Import Instance and line patterns in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/8001963#M50161</link>
    <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;The link below is a Revit project that shows what I mean:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/13eto5swx0cm35h/test.dwg.rvt?dl=0" target="_blank"&gt;https://www.dropbox.com/s/13eto5swx0cm35h/test.dwg.rvt?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The project contains a macro that will output the line patterns used by the lines contained in a block in a imported DWG file to a text file. The mysterious GraphicStyleType 3 appears here. It looks like it has to do with lines that have the linestyle overridden instead of "By Layer". These are the lines I'm trying to get the line pattern from.&lt;/P&gt;</description>
    <pubDate>Tue, 15 May 2018 06:03:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-15T06:03:13Z</dc:date>
    <item>
      <title>Import Instance and line patterns</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/7998924#M50159</link>
      <description>&lt;P&gt;Is it possible to get the line patterns used by lines in an import instance?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've noticed if I insert a CAD file the lines look correct but if I explode the block in Revit all the lines look solid. I've also noticed the GraphicStyleType on some lines is 3 but the API help file only shows Cut or Projection.&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 02:28:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/7998924#M50159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-14T02:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Import Instance and line patterns</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/7999177#M50160</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Paul,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You should be able to access absolutely all the line patterns in the entire database via a filtered element collector and RevitLookup.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Have you tried that?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I searched the Revit API docs and Internet for GraphicStyleType and found no further information on the mysterious number 3.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What does the user interface&amp;nbsp;display string say about&amp;nbsp;a line with such a setting?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does this problem appear only when working through the API, or do you observe the same behaviour when working manually through the user interface?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If so, the product support teams may have some more fruitful suggestions for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sorry I have nothing further to suggest off-hand...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 06:33:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/7999177#M50160</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-05-14T06:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import Instance and line patterns</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/8001963#M50161</link>
      <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;The link below is a Revit project that shows what I mean:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/13eto5swx0cm35h/test.dwg.rvt?dl=0" target="_blank"&gt;https://www.dropbox.com/s/13eto5swx0cm35h/test.dwg.rvt?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The project contains a macro that will output the line patterns used by the lines contained in a block in a imported DWG file to a text file. The mysterious GraphicStyleType 3 appears here. It looks like it has to do with lines that have the linestyle overridden instead of "By Layer". These are the lines I'm trying to get the line pattern from.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 06:03:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/8001963#M50161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-15T06:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Import Instance and line patterns</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/8008466#M50162</link>
      <description>&lt;P&gt;Lines in a DWG can't be overridden by element, just by category. So the answer to your question is to find the linetype of the category , and not of the line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;		private void ReadLinePattern(GeometryObject mc)
		{
			GraphicsStyle go_gs = projectDocument.GetElement(mc.GraphicsStyleId) as GraphicsStyle;
			Category cat = go_gs.GraphicsStyleCategory;
			if ( projectDocument.ActiveView.GetCategoryHidden(cat.Id)) return;
			OverrideGraphicSettings settings = projectDocument.ActiveView.GetCategoryOverrides(cat.Id);
			ElementId eid = settings.ProjectionLinePatternId;
			if (eid == ElementId.InvalidElementId) // category not overridden
			{
				eid = cat.GetLinePatternId(GraphicsStyleType.Projection);
			}
			LinePattern lpe = null;
			if (eid != LinePatternElement.GetSolidPatternId())
				{
					lpe = LinePatternElement.GetLinePattern(projectDocument, eid);
					if (lpe!=null) 
					{
						logFile.WriteLine("\tLine pattern = " + lpe.Name);
					}
					else{
						logFile.WriteLine("\tLinepatternElement==null  eid =  " + eid.IntegerValue.ToString());
					}
				}
				else
					logFile.WriteLine("\tLine pattern = Solid");
		}&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 May 2018 11:12:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/8008466#M50162</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-05-17T11:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Import Instance and line patterns</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/8013102#M50163</link>
      <description>&lt;P&gt;Sorry I'm not talking about overriding the line in an imported DWG in a Revit view (through the UI). I mean if the line was set to something other than "By Layer" while still in AutoCAD. I have noticed when I import a DWG file into Revit the DWG lines with a pattern set are preserved until the imported DWG is exploded. Then all the lines seem to change to the line style of the AutoCAD layer they were on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if it is possible to get the line style before exploding the imported DWG file with the API.&lt;/P&gt;</description>
      <pubDate>Sat, 19 May 2018 10:28:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/import-instance-and-line-patterns/m-p/8013102#M50163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-19T10:28:31Z</dc:date>
    </item>
  </channel>
</rss>

