.NET

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

Get Linetype name from Dialog

83 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 (83 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.