.NET

Reply
Active Contributor
Littlerubarbwk
Posts: 38
Registered: ‎09-08-2006
Message 1 of 2 (82 Views)

Get Linetype name from Dialog

82 Views, 1 Replies
10-18-2006 12:07 PM
How would i go around doing this, any ideas
Active Contributor
Littlerubarbwk
Posts: 38
Registered: ‎09-08-2006
Message 2 of 2 (82 Views)

Re: Get Linetype name from Dialog

10-18-2006 02:16 PM in reply to: Littlerubarbwk
I figured it out
Linetype dialog to wnidow form;

Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Populates Combobox 2 with the current Drawing Linetypes
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim t As Transaction = db.TransactionManager.StartTransaction()
Dim LD As New Autodesk.AutoCAD.Windows.LinetypeDialog
Dim dr As Windows.Forms.DialogResult = LD.ShowDialog 'Show the Dialog
If dr = Windows.Forms.DialogResult.OK Then 'If user clicked OK then
Dim str As String = ""
Dim ltyp As ObjectId
ltyp = LD.Linetype
Dim sld As LinetypeTableRecord = CType(t.GetObject(ltyp, OpenMode.ForRead), LinetypeTableRecord)
str = sld.Name
TextBox4.Text = str
End If
t.Dispose()
db.Dispose()
End Sub
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.