<?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 vb.net - Topobase - draw area of display-model in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/vb-net-topobase-draw-area-of-display-model/m-p/7235171#M30571</link>
    <description>&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to draw displaymodels of topobase-data and create following code base on agu-Deutschland help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Public Sub DrawDM(Document As Autodesk.Map.IM.Forms.Document, Optional ByVal Silent As Boolean = True)
        Dim DM_Name As String = "O:\Map2015-Darstellungsmodelle\ALKIS 20170125\ALKIS für DWG.tbdm"
        Dim Msg As String = ""
        Dim acDocMgr As DocumentCollection = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
        Dim acDoc As Autodesk.AutoCAD.ApplicationServices.Document = acDocMgr.MdiActiveDocument

        If System.IO.File.Exists(DM_Name) = False Then
            If Silent = False Then
                MsgBox("Darstellungsmodell nicht gefunden!", MsgBoxStyle.Critical, k_AppName_Vermessung)
            End If
            Exit Sub
        End If

        If IsNothing(Document) Then
            If Silent = False Then
                MsgBox("Es ist kein Dokument zugewiesen!", MsgBoxStyle.Critical, k_AppName_Vermessung)
            End If
            Exit Sub
        End If

        Dim graphicsGenerator As Autodesk.Map.IM.Display.GraphicsGeneration.IGraphicsGenerator
        Try
            graphicsGenerator = Document.Application.Services.GetService(Of Autodesk.Map.IM.Display.GraphicsGeneration.IGraphicsGenerator)()

            'Bildaufbau


            Dim displayRepository As Autodesk.Map.IM.Display.DisplayModelManagement.IDisplayModelRepository
            displayRepository = graphicsGenerator.DisplayModelRepository

            Dim RepositoryPath As String
            RepositoryPath = graphicsGenerator.DisplayModelRepository.RepositoryDirectory.ToString()


            graphicsGenerator.DisplayModel = displayRepository.Load(DM_Name)
            'graphicsGenerator.DisplayModel = displayRepository.Load(RepositoryPath + "\" + "MeinDarstellungsmodell.tbdm")

            graphicsGenerator.ShowProgressBar = True

            Dim mydocuments As System.Collections.Generic.ICollection(Of Autodesk.Map.IM.Display.GraphicsGeneration.IDocument)

            'acDoc As Autodesk.AutoCAD.ApplicationServices.Document
            Dim docLock As DocumentLock = acDoc.LockDocument
            Using docLock
                mydocuments = graphicsGenerator.Draw
            End Using
        Catch ex As Exception
            Dim TryReport As New EBL.Service.TryCatchReport
            TryReport.Show("unerwarteter Fehler in EBL.Import.SielVerm &amp;gt; VermSielPunktImport", ex.ToString)
        Finally
            graphicsGenerator.ShowProgressBar = False
        End Try

    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this code the complete area will draw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;question 1:&lt;/P&gt;&lt;P&gt;is there a way to define a area to draw like the Topobase function in the Dialog?&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="dm_20170718.png" style="width: 574px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/378991i8512C2191394BA0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="dm_20170718.png" alt="dm_20170718.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;question 2:&lt;/P&gt;&lt;P&gt;the draw process in dwg1 is ok&lt;/P&gt;&lt;P&gt;when i open a secound dwg (dwg2) the dwg-title will show dwg1 and it&amp;nbsp;looks like the data will Import to dwg1 - but finally the data are correct into dwg2 draw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you have a idea of reason for this phänomen?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reagards Jan&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2017 12:02:34 GMT</pubDate>
    <dc:creator>jan_tappenbeck</dc:creator>
    <dc:date>2017-07-18T12:02:34Z</dc:date>
    <item>
      <title>vb.net - Topobase - draw area of display-model</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-topobase-draw-area-of-display-model/m-p/7235171#M30571</link>
      <description>&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to draw displaymodels of topobase-data and create following code base on agu-Deutschland help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Public Sub DrawDM(Document As Autodesk.Map.IM.Forms.Document, Optional ByVal Silent As Boolean = True)
        Dim DM_Name As String = "O:\Map2015-Darstellungsmodelle\ALKIS 20170125\ALKIS für DWG.tbdm"
        Dim Msg As String = ""
        Dim acDocMgr As DocumentCollection = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
        Dim acDoc As Autodesk.AutoCAD.ApplicationServices.Document = acDocMgr.MdiActiveDocument

        If System.IO.File.Exists(DM_Name) = False Then
            If Silent = False Then
                MsgBox("Darstellungsmodell nicht gefunden!", MsgBoxStyle.Critical, k_AppName_Vermessung)
            End If
            Exit Sub
        End If

        If IsNothing(Document) Then
            If Silent = False Then
                MsgBox("Es ist kein Dokument zugewiesen!", MsgBoxStyle.Critical, k_AppName_Vermessung)
            End If
            Exit Sub
        End If

        Dim graphicsGenerator As Autodesk.Map.IM.Display.GraphicsGeneration.IGraphicsGenerator
        Try
            graphicsGenerator = Document.Application.Services.GetService(Of Autodesk.Map.IM.Display.GraphicsGeneration.IGraphicsGenerator)()

            'Bildaufbau


            Dim displayRepository As Autodesk.Map.IM.Display.DisplayModelManagement.IDisplayModelRepository
            displayRepository = graphicsGenerator.DisplayModelRepository

            Dim RepositoryPath As String
            RepositoryPath = graphicsGenerator.DisplayModelRepository.RepositoryDirectory.ToString()


            graphicsGenerator.DisplayModel = displayRepository.Load(DM_Name)
            'graphicsGenerator.DisplayModel = displayRepository.Load(RepositoryPath + "\" + "MeinDarstellungsmodell.tbdm")

            graphicsGenerator.ShowProgressBar = True

            Dim mydocuments As System.Collections.Generic.ICollection(Of Autodesk.Map.IM.Display.GraphicsGeneration.IDocument)

            'acDoc As Autodesk.AutoCAD.ApplicationServices.Document
            Dim docLock As DocumentLock = acDoc.LockDocument
            Using docLock
                mydocuments = graphicsGenerator.Draw
            End Using
        Catch ex As Exception
            Dim TryReport As New EBL.Service.TryCatchReport
            TryReport.Show("unerwarteter Fehler in EBL.Import.SielVerm &amp;gt; VermSielPunktImport", ex.ToString)
        Finally
            graphicsGenerator.ShowProgressBar = False
        End Try

    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this code the complete area will draw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;question 1:&lt;/P&gt;&lt;P&gt;is there a way to define a area to draw like the Topobase function in the Dialog?&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="dm_20170718.png" style="width: 574px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/378991i8512C2191394BA0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="dm_20170718.png" alt="dm_20170718.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;question 2:&lt;/P&gt;&lt;P&gt;the draw process in dwg1 is ok&lt;/P&gt;&lt;P&gt;when i open a secound dwg (dwg2) the dwg-title will show dwg1 and it&amp;nbsp;looks like the data will Import to dwg1 - but finally the data are correct into dwg2 draw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you have a idea of reason for this phänomen?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reagards Jan&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 12:02:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-topobase-draw-area-of-display-model/m-p/7235171#M30571</guid>
      <dc:creator>jan_tappenbeck</dc:creator>
      <dc:date>2017-07-18T12:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net - Topobase - draw area of display-model</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-topobase-draw-area-of-display-model/m-p/7237007#M30572</link>
      <description>&lt;P&gt;It's probably best to post Topobase questions in the Map Developer forum.&amp;nbsp; Use IFilterSetter to apply a geometry filter (c# but hopefully you will get the general idea):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IFilterSetter filterSetter = FilterSetterFactory.Create(gg.DisplayModel);
filterSetter.OnlyOnTopobaseLayers = false;
filterSetter.TransformCoordSysInFilter = true;

var polygon = new Polygon
         {
             new LinePoint(extents2d.MinPoint.X, extents2d.MinPoint.Y),
             new LinePoint(extents2d.MaxPoint.X, extents2d.MinPoint.Y),
             new LinePoint(extents2d.MaxPoint.X, extents2d.MaxPoint.Y),
             new LinePoint(extents2d.MinPoint.X, extents2d.MaxPoint.Y),
             new LinePoint(extents2d.MinPoint.X, extents2d.MinPoint.Y)
         };

filterSetter.ApplyViewport(polygon);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 22:20:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-topobase-draw-area-of-display-model/m-p/7237007#M30572</guid>
      <dc:creator>drewbb</dc:creator>
      <dc:date>2017-07-18T22:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net - Topobase - draw area of display-model</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-topobase-draw-area-of-display-model/m-p/7241059#M30573</link>
      <description>&lt;P&gt;i start a new posting in &lt;A href="https://forums.autodesk.com/t5/autocad-map-3d-developer/vb-net-topobase-draw-area-of-display-model/td-p/7241055" target="_blank"&gt;https://forums.autodesk.com/t5/autocad-map-3d-developer/vb-net-topobase-draw-area-of-display-model/td-p/7241055&lt;/A&gt; - wish by drewbb&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards Jan&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 07:40:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-topobase-draw-area-of-display-model/m-p/7241059#M30573</guid>
      <dc:creator>jan_tappenbeck</dc:creator>
      <dc:date>2017-07-20T07:40:08Z</dc:date>
    </item>
  </channel>
</rss>

