.NET

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

Get Linetype name from Dialog

78 Views, 1 Replies
10-18-2006 12:07 PM
How would i go around doing this, any ideas
Active Contributor
Posts: 38
Registered: ‎09-08-2006
Message 2 of 2 (78 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community