kduck63 Posted November 17, 2011 Posted November 17, 2011 I made this little program in vba a while back to extract points and write an output file. I would like to start writing this stuff in vb express 2010, but i am not sure how to extract the x,y,z info from each point when in the .net world. I have searched the threads, but i don't see the answer. Private Sub CommandButton1_Click() UserForm1.Hide Dim sset As AcadSelectionSet Dim OpenFlag As Boolean Set sset = ThisDrawing.SelectionSets.Add("SS1") sset.SelectOnScreen Dim ent As AcadObject Dim x As Double Dim y As Double Dim z As Double Dim coords As Variant EntCnt = 0 Open "c:\temp\point_xyz.csv" For Output As #1 For Each ent In sset 'Loop through the SelectionSet collection If ent.ObjectName = "AcDbPoint" Then coords = ent.Coordinates x = coords(0) y = coords(1) z = coords(2) Print #1, x, ",", y, ",", z End If Next ent Close #1 sset.Delete UserForm1.Show End End Sub Quote
kduck63 Posted November 17, 2011 Author Posted November 17, 2011 I just realized the express edition of vb 2010 has an Object Browser.... that should help me answer my question. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.