<?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: Set UseBasePoint for DBText in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4713473#M46274</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, didnt understand you question correctly.&lt;/P&gt;&lt;P&gt;What is the purpose of picking those two points ?&lt;/P&gt;&lt;P&gt;You want to place text at those two points ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Dec 2013 10:41:35 GMT</pubDate>
    <dc:creator>Ajilal.Vijayan</dc:creator>
    <dc:date>2013-12-24T10:41:35Z</dc:date>
    <item>
      <title>Set UseBasePoint for DBText</title>
      <link>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4713321#M46273</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a problem, hope everybody can help me. This is, where can i put this code: ppo.UseBasePoint = True ,ppo.BasePoint = pt1,ppo.UseDashedLine = True into my program:&lt;/P&gt;&lt;PRE&gt; &amp;lt;CommandMethod("dd")&amp;gt; Public Sub DrawText()
        Dim doc As Document = Application.DocumentManager.MdiActiveDocument
        Dim ed As Editor = doc.Editor
        Dim db As Database = doc.Database
        doc.LockDocument()
        Dim ppo As PromptPointOptions = New PromptPointOptions("")
        ppo.Message = vbLf &amp;amp; "Choose the first vertex of the square:  "
        Dim ppr As PromptPointResult = ed.GetPoint(ppo)
        If ppr.Status &amp;lt;&amp;gt; PromptStatus.OK Then
            Return
        End If
        Dim pt1 As Point3d = ppr.Value
        '' Start a transaction
        Using acTrants As Transaction = db.TransactionManager.StartTransaction()
            Dim acBlkTbl As BlockTable
            acBlkTbl = acTrants.GetObject(db.BlockTableId, _
            OpenMode.ForRead)
            '' Open the Block table record Model space for write
            Dim acBlkTblRec As BlockTableRecord
            acBlkTblRec = acTrants.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), _
                                            OpenMode.ForWrite)
            ''Create a single-line text object
            Dim acText As DBText = New DBText()
            acText.SetDatabaseDefaults()
            acText.Position = ppr.Value
            acText.Height = 100
            acText.TextString = "Cadviet"
            acText.WidthFactor = 0.8
            acText.HorizontalMode = TextHorizontalMode.TextCenter
            acText.VerticalMode = TextVerticalMode.TextVerticalMid
            acText.AlignmentPoint = ppr.Value
            acBlkTblRec.AppendEntity(acText)
            acTrants.AddNewlyCreatedDBObject(acText, True)
            acTrants.Commit()
        End Using
        ppo.Message = vbLf &amp;amp; "Choose the second vertex of the square:  "
        ppo.UseBasePoint = True
        ppo.BasePoint = pt1
        ppo.UseDashedLine = True
        ppr = ed.GetPoint(ppo)
    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I use "MULTIPLE" in comman line of autocad, so i want to create one more acText.&amp;nbsp; Thanks Everybody.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2013 08:48:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4713321#M46273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-24T08:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set UseBasePoint for DBText</title>
      <link>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4713473#M46274</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, didnt understand you question correctly.&lt;/P&gt;&lt;P&gt;What is the purpose of picking those two points ?&lt;/P&gt;&lt;P&gt;You want to place text at those two points ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2013 10:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4713473#M46274</guid>
      <dc:creator>Ajilal.Vijayan</dc:creator>
      <dc:date>2013-12-24T10:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set UseBasePoint for DBText</title>
      <link>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4714305#M46275</link>
      <description>This meaning. I want to create a lot of text "CadViet" and They have to aligned, i use UsebasePoint do that. Example: I want to draw 2 text "CadViet" into autocad. I will draw first text and next text have to align following the first text. Thanks very much.</description>
      <pubDate>Wed, 25 Dec 2013 01:48:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4714305#M46275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-25T01:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set UseBasePoint for DBText</title>
      <link>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4714613#M46276</link>
      <description>&lt;P&gt;You can just clone text something like this:&lt;/P&gt;
&lt;PRE&gt;        &amp;lt;CommandMethod("dctext")&amp;gt; _
        Public Sub DrawCopyText()
            Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
            Dim ed As Editor = doc.Editor
            Dim db As Database = doc.Database
            doc.LockDocument()
            Dim ppo As PromptPointOptions = New PromptPointOptions("")
            ppo.Message = vbLf &amp;amp; "Choose the first vertex of the square:  "
            Dim ppr As PromptPointResult = ed.GetPoint(ppo)
            If ppr.Status &amp;lt;&amp;gt; PromptStatus.OK Then
                Return
            End If
            Dim pt1 As Point3d = ppr.Value
            '' Start a transaction
            Using acTrants As Transaction = db.TransactionManager.StartTransaction()
                Dim acBlkTbl As BlockTable
                acBlkTbl = acTrants.GetObject(db.BlockTableId, _
                OpenMode.ForRead)
                '' Open the Block table record Model space for write
                Dim acBlkTblRec As BlockTableRecord
                acBlkTblRec = acTrants.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), _
                                                OpenMode.ForWrite)
                ''Create a single-line text object
                Dim acText As DBText = New DBText()
                acText.SetDatabaseDefaults()
                acText.Position = pt1
                acText.Height = 100
                acText.TextString = "Cadviet"
                acText.WidthFactor = 0.8
                acText.HorizontalMode = TextHorizontalMode.TextCenter
                acText.VerticalMode = TextVerticalMode.TextVerticalMid
                acText.AlignmentPoint = pt1
                acBlkTblRec.AppendEntity(acText)
                acTrants.AddNewlyCreatedDBObject(acText, True)

                ppo.Message = vbLf &amp;amp; "Choose the second vertex of the square:  "
                ppo.UseBasePoint = True
                ppo.BasePoint = pt1
                ppo.UseDashedLine = True
                ppr = ed.GetPoint(ppo)
                Dim pt2 As Point3d = ppr.Value
                Dim vec As Vector3d = pt2 - pt1
                Dim acText2 As DBText = CType(acText.Clone, DBText)
                acText2.TransformBy(Matrix3d.Displacement(vec))
                acBlkTblRec.AppendEntity(acText2)
                acTrants.AddNewlyCreatedDBObject(acText2, True)
                acTrants.Commit()
            End Using
        End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2013 08:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4714613#M46276</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-12-25T08:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set UseBasePoint for DBText</title>
      <link>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4714739#M46277</link>
      <description>Thanks so much</description>
      <pubDate>Wed, 25 Dec 2013 09:39:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/set-usebasepoint-for-dbtext/m-p/4714739#M46277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-25T09:39:23Z</dc:date>
    </item>
  </channel>
</rss>

