Mark,
It is that easy, but if you did it in VBA it would be even more straight
forward. The thing that I like about VBA is that you don't have to remember
the name of the function calls, VBA will show you a list of them, and I find
it much eaiser to read and maintain. In addition, most of the the help and
the samples for the Civil 3D are written in VBA.
Here is your code in VBA, the difference is that I'm not looking for the LDT
point object (but I could) and I'm displaying a dialog box with the point
infomration instead of putting it to the command line.
Option Explicit
Public Sub PointTest()
Dim obj As AcadObject
Dim pt As Variant
Dim sMsg As String
Dim cgPoint As AeccPoint
ThisDrawing.Utility.GetEntity obj, pt, "Select point:"
If TypeOf obj Is AeccPoint Then
Set cgPoint = obj
sMsg = "Elevation = " & Format(cgPoint.Elevation, "0.00")
sMsg = sMsg & vbCr & "Raw Description = " & cgPoint.RawDescription
sMsg = sMsg & vbCr & "Full Description = " & cgPoint.FullDescription
sMsg = sMsg & vbCr & "Layer = " & cgPoint.Layer
MsgBox sMsg, vbInformation, "Point #" & cgPoint.Number
cgPoint.RawDescription = "new raw"
cgPoint.Layer = "Layer1" 'change the layer of the point
End If
End Sub
Regards,
Peter Funk
Civil 3D Product Manager
Autodesk, Inc.