<?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: DIMBLK ObjectID for Closed Filled Arrow in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6374338#M37044</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At my end I am using normal template which comes with AutoCAD installation. I am not sure why the code is not working in&amp;nbsp;custom templates&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2016 08:58:30 GMT</pubDate>
    <dc:creator>Virupaksha_aithal</dc:creator>
    <dc:date>2016-06-09T08:58:30Z</dc:date>
    <item>
      <title>DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6052755#M37023</link>
      <description>&lt;P&gt;I've been up and down the dial on this one and have not found how to purposely, through .net, set DIMBLK1 to a closed filled arrow.&amp;nbsp; Setting DIMBLK to "." or "" doesn't&amp;nbsp;return an obectid to use in RotatedDimension.Dimbl1 because it has no name to use in ObjId = bt(arrowname).&amp;nbsp; Has anyonefound how to get this objectid or how to apply it a specific instance of a dimension?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:55:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6052755#M37023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-23T16:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6053744#M37024</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;does the blog item&amp;nbsp;&lt;A href="http://adndevblog.typepad.com/autocad/2012/11/setting-different-arrow-heads-for-dimension-style.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/11/setting-different-arrow-heads-for-dimension-style.html&lt;/A&gt; helps?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 05:10:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6053744#M37024</guid>
      <dc:creator>Virupaksha_aithal</dc:creator>
      <dc:date>2016-02-24T05:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6056862#M37025</link>
      <description>&lt;P&gt;No help at that blog, been through that blog previously as my op implies.&amp;nbsp; Specific to the ClosedFilled arrow is needed as it is handled differently.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 19:30:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6056862#M37025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T19:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6057206#M37026</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have done this some times ago but I do not have source coding with my right now.&lt;/P&gt;&lt;P&gt;If I&amp;nbsp;remember correctly for&amp;nbsp;closed fillet arrow ObjectId=0&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 22:12:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6057206#M37026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T22:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6057572#M37027</link>
      <description>&lt;P&gt;You may set the S&lt;SPAN&gt;ystem variable&amp;nbsp;"DIMBLK" as&amp;nbsp;“.”&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("DIMBLK",“.”);&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 05:42:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6057572#M37027</guid>
      <dc:creator>net_bat</dc:creator>
      <dc:date>2016-02-26T05:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6057652#M37028</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;FONT color="#808080"&gt;&lt;EM&gt;Ron_M wrote:&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;&lt;EM&gt;I've been up and down the dial on this one and have not found how to purposely, through .net, set DIMBLK1 to a closed filled arrow.&amp;nbsp; Setting DIMBLK to "." or "" doesn't&amp;nbsp;return an obectid to use in RotatedDimension.Dimbl1 because it has no name to use in ObjId = bt(arrowname).&amp;nbsp; Has anyonefound how to get this objectid or how to apply it a specific instance of a dimension?&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What are you trying to do ??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just reset the&amp;nbsp;DIMBLK value ?&lt;/P&gt;
&lt;P&gt;Define a new dimension style ?&lt;/P&gt;
&lt;P&gt;Override an existing definition ?&lt;/P&gt;
&lt;P&gt;Modify an existing dimension ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 07:40:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6057652#M37028</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2016-02-26T07:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6058038#M37029</link>
      <description>&lt;P&gt;I'm overriding an existing dim style.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the closed filled arrow has no name I'm unable to pull the object id using something like below because I can't pass a name "arrow" to the function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Private Shared Function GetArrowObjectId(arrow As String, newArrName As String) As ObjectId
        Dim arrObjId As ObjectId = ObjectId.Null
        Dim AcDoc As Document = Core.Application.DocumentManager.MdiActiveDocument
        Dim AcDb As Database = AcDoc.Database
        Dim oldArrName As String = TryCast(Core.Application.GetSystemVariable(arrow), String)
        Core.Application.SetSystemVariable(arrow, newArrName)
        If oldArrName.Length &amp;lt;&amp;gt; 0 Then
            Core.Application.SetSystemVariable(arrow, oldArrName)
        End If
        Using Trans As Transaction = AcDb.TransactionManager.StartTransaction()
            Dim bt As BlockTable = DirectCast(Trans.GetObject(AcDb.BlockTableId, OpenMode.ForRead), BlockTable)
            arrObjId = bt(newArrName)
            Trans.Commit()
        End Using
        Return arrObjId
    End Function&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Feb 2016 12:54:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6058038#M37029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-26T12:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6059375#M37030</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've posted here :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.theswamp.org/index.php?topic=50998.msg561270" target="_blank"&gt;https://www.theswamp.org/index.php?topic=50998.msg561270&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;re the image: The empty dimblk names and null ID's are for the default&amp;nbsp;'Closed filled' arrow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/220871i39FC03BDF10E0EFB/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="DimBlkStuff snip_20160227172800.png" title="DimBlkStuff snip_20160227172800.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 08:00:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6059375#M37030</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2016-02-27T08:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6212883#M37031</link>
      <description>You're welcome.</description>
      <pubDate>Sat, 12 Mar 2016 23:45:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6212883#M37031</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2016-03-12T23:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6214907#M37032</link>
      <description>&lt;P&gt;For?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 17:52:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6214907#M37032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-14T17:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6335131#M37033</link>
      <description>&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Colors
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.Runtime
Public Class Slope

#Region " Public Propties"
    Property AcDoc As Document = Core.Application.DocumentManager.MdiActiveDocument
    Property AcDb As Database = AcDoc.Database
    Property AcEd As Editor = AcDoc.Editor
    Property BlkTab As BlockTable
    Property BlkTabRec As BlockTableRecord
    Property per1 As PromptEntityResult
    Property per1id As ObjectId
    Property OrigDimStyle As String = Core.Application.GetSystemVariable("dimstyle")
    Property Origlayer As String = Core.Application.GetSystemVariable("clayer")
    Property Origosmode As Double = Core.Application.GetSystemVariable("osmode")
    Property OOrthomode As Double = Core.Application.GetSystemVariable("orthomode")

#End Region

    &amp;lt;CommandMethod("slp")&amp;gt;
    Public Sub slopearrow()

        Dim pt(0 To 18) As Point3d
        Dim pts(0 To 7) As Point3d

        Dim peo1 As PromptNestedEntityOptions = New PromptNestedEntityOptions(vbLf &amp;amp; "Pick the sloped line or polyline segment: ")
        peo1.AllowNone = True
        Dim per1 As PromptNestedEntityResult = AcEd.GetNestedEntity(peo1)
        If per1.Status &amp;lt;&amp;gt; PromptStatus.OK Then
            Exit Sub
        Else
            per1id = per1.ObjectId
        End If

        AddLayer()

        Using (AcDoc.LockDocument)
            Using Trans As Transaction = AcDb.TransactionManager.StartTransaction
                Dim x1 As Double = Nothing, x2 As Double = Nothing
                Dim y1 As Double = Nothing, y2 As Double = Nothing
                Dim PtMid As New Point3d, Pt1 As New Point3d, PT2 As New Point3d
                Dim MidPt As New DBPoint, PtA As New DBPoint, PtB As New DBPoint
                Dim line1 As Line = Nothing
                Dim LineAng As String = Nothing
                PtMid = Nothing
                Pt1 = Nothing
                PT2 = Nothing
                MidPt = Nothing
                PtA = Nothing
                PtB = Nothing

                Dim ent As Entity = Trans.GetObject(per1id, OpenMode.ForRead)
                AcDb.Dimblk = ObjectId.Null
                If TypeOf ent Is Line Then
                    line1 = ent
                    LineAng = line1.Angle.ToString
                ElseIf TypeOf ent Is Polyline Then
                    Dim wcsPickedPoint As Point3d = per1.PickedPoint.TransformBy(AcEd.CurrentUserCoordinateSystem)
                    Dim pline As Polyline = DirectCast(Trans.GetObject(per1.ObjectId, OpenMode.ForRead), Polyline)
                    Dim pointOnPline As Point3d =
        If(per1.GetContainers().Length = 0,
            pline.GetClosestPointTo(wcsPickedPoint, False),
            pline.GetClosestPointTo(wcsPickedPoint.TransformBy(per1.Transform.Inverse()), False))

                    ' Get the selected segment index.
                    Dim segmentIndex As Integer = pline.GetParameterAtPoint(pointOnPline)
                    Dim PSeg As LineSegment2d = pline.GetLineSegment2dAt(segmentIndex)
                    Dim p1x As Double = PSeg.StartPoint.X
                    Dim p1y As Double = PSeg.StartPoint.Y
                    Dim p2x As Double = PSeg.EndPoint.X
                    Dim p2y As Double = PSeg.EndPoint.Y
                    line1 = New Line(New Point3d(p1x, p1y, 0), New Point3d(p2x, p2y, 0))
                    LineAng = line1.Angle.ToString
                End If

                pt(1) = line1.StartPoint
                pt(2) = line1.EndPoint

                If line1.StartPoint.X &amp;lt; line1.EndPoint.X And line1.StartPoint.Y &amp;lt; line1.EndPoint.Y Then
                    '1
                    AddLayer()
                    PtMid = New Point3d((pt(1).X + pt(2).X) / 2, (pt(1).Y + pt(2).Y) / 2, 0)
                    MidPt = New DBPoint(PtMid)
                    x1 = PtMid.X - (1 * Math.Cos(LineAng))
                    y1 = PtMid.Y - (1 * Math.Sin(LineAng))
                    x2 = PtMid.X + (1 * Math.Cos(LineAng))
                    y2 = PtMid.Y + (1 * Math.Sin(LineAng))
                    Pt1 = New Point3d(x1, y1, 0)
                    PtA = New DBPoint(Pt1)
                    PT2 = New Point3d(x2, y2, 0)
                    PtB = New DBPoint(PT2)

                    '2
                ElseIf line1.StartPoint.X &amp;gt; line1.EndPoint.X And line1.StartPoint.Y &amp;lt; line1.EndPoint.Y Then
                    AddLayer()
                    PtMid = New Point3d((pt(1).X + pt(2).X) / 2, (pt(1).Y + pt(2).Y) / 2, 0)
                    MidPt = New DBPoint(PtMid)
                    x1 = PtMid.X - (1 * Math.Cos(LineAng))
                    y1 = PtMid.Y - (1 * Math.Sin(LineAng))
                    x2 = PtMid.X + (1 * Math.Cos(LineAng))
                    y2 = PtMid.Y + (1 * Math.Sin(LineAng))
                    Pt1 = New Point3d(x1, y1, 0)
                    PtA = New DBPoint(Pt1)
                    PT2 = New Point3d(x2, y2, 0)
                    PtB = New DBPoint(PT2)

                    '3
                ElseIf line1.StartPoint.X &amp;gt; line1.EndPoint.X And line1.StartPoint.Y &amp;gt; line1.EndPoint.Y Then
                    AddLayer()
                    PtMid = New Point3d((pt(1).X + pt(2).X) / 2, (pt(1).Y + pt(2).Y) / 2, 0)
                    MidPt = New DBPoint(PtMid)
                    x1 = PtMid.X + (1 * Math.Cos(LineAng))
                    y1 = PtMid.Y + (1 * Math.Sin(LineAng))
                    x2 = PtMid.X - (1 * Math.Cos(LineAng))
                    y2 = PtMid.Y - (1 * Math.Sin(LineAng))
                    Pt1 = New Point3d(x1, y1, 0)
                    PtA = New DBPoint(Pt1)
                    PT2 = New Point3d(x2, y2, 0)
                    PtB = New DBPoint(PT2)

                    '4
                ElseIf line1.StartPoint.X &amp;lt; line1.EndPoint.X And line1.StartPoint.Y &amp;gt; line1.EndPoint.Y Then
                    AddLayer()
                    PtMid = New Point3d((pt(1).X + pt(2).X) / 2, (pt(1).Y + pt(2).Y) / 2, 0)
                    MidPt = New DBPoint(PtMid)
                    x1 = PtMid.X + (1 * Math.Cos(LineAng))
                    y1 = PtMid.Y + (1 * Math.Sin(LineAng))
                    x2 = PtMid.X - (1 * Math.Cos(LineAng))
                    y2 = PtMid.Y - (1 * Math.Sin(LineAng))
                    Pt1 = New Point3d(x1, y1, 0)
                    PtA = New DBPoint(Pt1)
                    PT2 = New Point3d(x2, y2, 0)
                    PtB = New DBPoint(PT2)

                    BlkTab = Trans.GetObject(AcDb.BlockTableId, OpenMode.ForRead)
                    BlkTabRec = Trans.GetObject(BlkTab(BlockTableRecord.ModelSpace), OpenMode.ForWrite)

                End If
                Trans.Commit()
                AddArrow(Pt1, PT2, PtMid, LineAng)
            End Using
        End Using

    End Sub

    Public Sub AddArrow(Pt1 As Point3d, Pt2 As Point3d, PtMid As Point3d, LineAng As Double)
        Using (AcDoc.LockDocument)
            Using Trans As Transaction = AcDb.TransactionManager.StartTransaction
                BlkTab = Trans.GetObject(AcDb.BlockTableId, OpenMode.ForWrite)
                BlkTabRec = Trans.GetObject(BlkTab(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
                Dim OldDimBlk1 As String = Core.Application.GetSystemVariable("dimblk")
                Core.Application.SetSystemVariable("DIMBLK", "closed")
                Core.Application.SetSystemVariable("DIMBLK", ".")

                BlkTab = Trans.GetObject(AcDb.BlockTableId, OpenMode.ForWrite)
                BlkTabRec = Trans.GetObject(BlkTab(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
                Dim arrowname As String = DirectCast(Core.Application.GetSystemVariable("DIMBLK"), String)
                Dim id1 As ObjectId = GetArrowObjectId("DIMBLK", ".")
                Dim id2 As ObjectId = GetArrowObjectId("DIMBLK2", "_NONE")
                Using RotDim As RotatedDimension = New RotatedDimension
                    RotDim.XLine1Point = New Point3d(Pt1.X, Pt1.Y, 0)
                    RotDim.XLine2Point = New Point3d(Pt2.X, Pt2.Y, 0)
                    RotDim.Rotation = LineAng
                    RotDim.DimLinePoint = New Point3d(PtMid.X, PtMid.Y, 0)
                    RotDim.DimensionStyle = AcDb.Dimstyle
                    Dim DimObj As Dimension = RotDim
                    DimObj.Dimtad = 1
                    DimObj.DimensionText = "SLOPE"
                    DimObj.Dimdli = 2
                    DimObj.Dimfxlen = 0.125
                    RotDim.Dimsah = True
                    RotDim.Dimblk1 = id1
                    RotDim.Dimblk2 = id2
                    BlkTabRec.AppendEntity(RotDim)
                    Trans.AddNewlyCreatedDBObject(RotDim, True)

                End Using
                Trans.Commit()
            End Using
        End Using
    End Sub

    Public Sub AddLayer()
        Using (AcDoc.LockDocument())
            Using Trans As Transaction = AcDb.TransactionManager.StartTransaction()
                Dim laytb As LayerTable = Trans.GetObject(AcDb.LayerTableId, OpenMode.ForRead)
                If laytb.Has("NOTE") = True Then
                    Dim oldlayer As LayerTableRecord
                    oldlayer = Trans.GetObject(laytb("NOTE"), OpenMode.ForWrite)
                    If oldlayer.IsFrozen = True Then
                        oldlayer.IsFrozen = False
                    End If
                    If oldlayer.IsLocked = True Then
                        oldlayer.IsLocked = False
                    End If
                    If oldlayer.IsOff = True Then
                        oldlayer.IsOff = False
                    End If
                    If oldlayer.IsHidden = True Then
                        oldlayer.IsHidden = False
                    End If
                Else
                    If laytb.Has("NOTE") = False Then
                        Dim newlayer As LayerTableRecord = New LayerTableRecord()
                        newlayer.Name = "NOTE"
                        newlayer.LineWeight = LineWeight.LineWeight005
                        newlayer.Color = Color.FromColorIndex(ColorMethod.ByAci, 1)
                        laytb.UpgradeOpen()
                        laytb.Add(newlayer)
                        Trans.AddNewlyCreatedDBObject(newlayer, True)
                        Dim lintb As LinetypeTable
                        lintb = Trans.GetObject(AcDb.LinetypeTableId, OpenMode.ForRead)
                        If lintb.Has("CONTINUOUS") = False Then
                            AcDb.LoadLineTypeFile("CONTINUOUS", "acad.lin")
                        End If
                        laytb.UpgradeOpen()
                        newlayer.LinetypeObjectId = lintb("CONTINUOUS")
                    End If
                End If
                Trans.Commit()
                AcDb.Clayer = laytb("NOTE")
                AcEd.Regen()
            End Using
        End Using
    End Sub

    Private Shared Function GetArrowObjectId(arrow As String, newArrName As String) As ObjectId
        Dim arrObjId As ObjectId = ObjectId.Null
        Dim AcDoc As Document = Core.Application.DocumentManager.MdiActiveDocument
        Dim AcDb As Database = AcDoc.Database
        Dim oldArrName As String = TryCast(Core.Application.GetSystemVariable(arrow), String)
        Core.Application.SetSystemVariable(arrow, newArrName)
        If oldArrName.Length &amp;lt;&amp;gt; 0 Then
            Core.Application.SetSystemVariable(arrow, oldArrName)
        End If
        Using Trans As Transaction = AcDb.TransactionManager.StartTransaction()
            Dim bt As BlockTable = DirectCast(Trans.GetObject(AcDb.BlockTableId, OpenMode.ForRead), BlockTable)
            If String.IsNullOrEmpty(newArrName) OrElse newArrName.Equals(".") Then
                Return ObjectId.Null
            Else
                arrObjId = bt(newArrName)
            End If
            Trans.Commit()
        End Using
        Return arrObjId
    End Function

End Class

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've still not managed to get this working.&amp;nbsp; I'm creating a slope arrow that is applied when line is selected.&amp;nbsp; As the code sits now the arrow on the down side remains "ARCHTICK" when I want it to be a closed arrow.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 18:47:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6335131#M37033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-18T18:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6347743#M37034</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you try with below &amp;nbsp;"AddArrow" instead of your code?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Public Sub AddArrow(Pt1 As Point3d, Pt2 As Point3d, PtMid As Point3d, LineAng As Double)
            Using (AcDoc.LockDocument)
                Dim id1 As ObjectId = GetArrowObjectId("DIMBLK1", "_Closed")
                Dim id2 As ObjectId = GetArrowObjectId("DIMBLK2", "_NONE")

                Using Trans As Transaction = AcDb.TransactionManager.StartTransaction
                    BlkTab = Trans.GetObject(AcDb.BlockTableId, OpenMode.ForRead)
                    BlkTabRec = Trans.GetObject(BlkTab(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
                    Using RotDim As RotatedDimension = New RotatedDimension
                        RotDim.XLine1Point = New Point3d(Pt1.X, Pt1.Y, 0)
                        RotDim.XLine2Point = New Point3d(Pt2.X, Pt2.Y, 0)
                        RotDim.Rotation = LineAng
                        RotDim.DimLinePoint = New Point3d(PtMid.X, PtMid.Y, 0)
                        RotDim.DimensionStyle = AcDb.Dimstyle
                        Dim DimObj As Dimension = RotDim
                        DimObj.Dimtad = 1
                        DimObj.DimensionText = "SLOPE"
                        DimObj.Dimdli = 2
                        DimObj.Dimfxlen = 0.125
                        RotDim.Dimsah = True
                        RotDim.Dimblk1 = id1
                        RotDim.Dimblk2 = id2
                        BlkTabRec.AppendEntity(RotDim)
                        Trans.AddNewlyCreatedDBObject(RotDim, True)
                    End Using
                    Trans.Commit()
                End Using
            End Using
        End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 07:44:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6347743#M37034</guid>
      <dc:creator>Virupaksha_aithal</dc:creator>
      <dc:date>2016-05-25T07:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6348158#M37035</link>
      <description>&lt;P&gt;Creates a closed but not closed filled arrow.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 12:25:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6348158#M37035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-25T12:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6349820#M37036</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please replace the code&lt;/P&gt;
&lt;PRE&gt;Dim id1 As ObjectId = GetArrowObjectId("DIMBLK1", "_Closed")&lt;/PRE&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;PRE&gt;Dim id1 As ObjectId = GetArrowObjectId("DIMBLK1", "")&lt;/PRE&gt;
&lt;P&gt;For closed filled style, just pass empty as block name. Hopefully this works and adds closed filled arrow head&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:37:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6349820#M37036</guid>
      <dc:creator>Virupaksha_aithal</dc:creator>
      <dc:date>2016-05-26T05:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6350339#M37037</link>
      <description>&lt;P&gt;Tried even though I've already been there as shown in previous posts.&amp;nbsp; Does not work.&amp;nbsp; Pulls in the current which is archtick.&amp;nbsp; I've also tried setting DIMBLK to "" and " " and "." prior to getting the objectid of DIMBLK1.&amp;nbsp; I've also tried to go direct by setting RotDim.Dimblk1 = 0 as directed by a previous post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 13:05:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6350339#M37037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-26T13:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6352098#M37038</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But by providing “” as block name, AutoCAD is able to create the closed arrowhead (with filled) at my end. Refer Screen cast&amp;nbsp;&lt;A href="http://autode.sk/25lP00w" target="_self"&gt;http://autode.sk/25lP00w &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 09:03:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6352098#M37038</guid>
      <dc:creator>Virupaksha_aithal</dc:creator>
      <dc:date>2016-05-27T09:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6352183#M37039</link>
      <description>&lt;P&gt;What arrowhead are you starting out with as DIMBLK, DIMBLK1 &amp;amp; DIMBLK2?&amp;nbsp; I'm starting with an established DIMSTYLE that uses ARCH_TICK as the arrow.&amp;nbsp; Would you post your code for comparison?&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 10:06:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6352183#M37039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-27T10:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6356657#M37040</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying with standard template file (which will have DIMBLK, DIMBLK1, DIMBLK2 as “”). Now I have tried with &amp;nbsp;&amp;nbsp;DIMBLK, DIMBLK1, DIMBLK2 as ARCH_TICK. With below code (only change I have made in code provided by you), AutoCAD is able to set the closed filled arrow as DIMBLK1. Refer &lt;A href="http://autode.sk/1Y0pNXu" target="_blank"&gt;http://autode.sk/1Y0pNXu&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;        Public Sub AddArrow(Pt1 As Point3d, Pt2 As Point3d, PtMid As Point3d, LineAng As Double)
            Using (AcDoc.LockDocument)
                Dim id1 As ObjectId = GetArrowObjectId("DIMBLK1", ".")
                Dim id2 As ObjectId = GetArrowObjectId("DIMBLK2", "_NONE")

                Using Trans As Transaction = AcDb.TransactionManager.StartTransaction
                    BlkTab = Trans.GetObject(AcDb.BlockTableId, OpenMode.ForRead)
                    BlkTabRec = Trans.GetObject(BlkTab(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
                    Using RotDim As RotatedDimension = New RotatedDimension
                        RotDim.XLine1Point = New Point3d(Pt1.X, Pt1.Y, 0)
                        RotDim.XLine2Point = New Point3d(Pt2.X, Pt2.Y, 0)
                        RotDim.Rotation = LineAng
                        RotDim.DimLinePoint = New Point3d(PtMid.X, PtMid.Y, 0)
                        RotDim.DimensionStyle = AcDb.Dimstyle
                        Dim DimObj As Dimension = RotDim
                        DimObj.Dimtad = 1
                        DimObj.DimensionText = "SLOPE"
                        DimObj.Dimdli = 2
                        DimObj.Dimfxlen = 0.125
                        RotDim.Dimsah = True
                        RotDim.Dimblk1 = id1
                        RotDim.Dimblk2 = id2
                        BlkTabRec.AppendEntity(RotDim)
                        
                        Trans.AddNewlyCreatedDBObject(RotDim, True)
                    End Using
                    Trans.Commit()
                End Using
            End Using
        End Sub&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 May 2016 05:55:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6356657#M37040</guid>
      <dc:creator>Virupaksha_aithal</dc:creator>
      <dc:date>2016-05-31T05:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6357305#M37041</link>
      <description>&lt;P&gt;Copy/paste your code in.&amp;nbsp; Still no joy.&amp;nbsp; Will look into this further this afternoon.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 13:10:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6357305#M37041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-31T13:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: DIMBLK ObjectID for Closed Filled Arrow</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6358170#M37042</link>
      <description>&lt;P&gt;It all appears to be based on our templates.&amp;nbsp; Within it, to facilitate creation of sheets we've set the default DIMBLK to ARCHTICK.&amp;nbsp; Even though the code changes that in variable it doesn't in practice.&amp;nbsp; Starting with the stock template, DIMBLK set to "", it works.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 18:05:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimblk-objectid-for-closed-filled-arrow/m-p/6358170#M37042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-31T18:05:33Z</dc:date>
    </item>
  </channel>
</rss>

