.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Linetype name from Dialog

1 REPLY 1
Reply
Message 1 of 2
Anonymous
250 Views, 1 Reply

Get Linetype name from Dialog

How would i go around doing this, any ideas
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost