Entity at a point

Discussion in 'AutoCAD' started by Brian Hailey, Aug 26, 2003.

  1. Brian Hailey

    Brian Hailey Guest

    How can I determine if a specific type of object (in this case, an
    AECCONTOUR) is at a specific 3d point? I have a list of points and if a
    contour exists at the point, I'm going to add a label to it, but I don't
    know the best way to check it.

    Thanks,

    Brian
     
    Brian Hailey, Aug 26, 2003
    #1
  2. Brian Hailey

    Jeff Mishler Guest

    Assuming Point is your 3d point....

    Dim groupCode(1) As Integer
    Dim dataValue(1) As Variant

    groupCode(0) = 0
    groupCode(1) = 40
    dataValue(0) = "AECCONTOUR"
    dataValue(1) = Point(2)

    ss.Select acSelectionSetCrossing, Point, Point, groupCode, dataValue

    should get you started....

    Jeff
     
    Jeff Mishler, Aug 26, 2003
    #2
  3. Brian Hailey

    Jeff Mishler Guest

    Yes, that was what I was thinking. I don't know the format of your points or
    file, but something along this line should work....

    Dim groupCode(1) As Integer
    Dim dataValue(1) As Variant

    groupCode(0) = 0
    groupCode(1) = 40
    dataValue(0) = "AECCONTOUR"

    ForEach Point In PointFile
    dataValue(1) = Point(2)
    ss.Select acSelectionSetCrossing, Point, Point, groupCode, dataValue
    If ss.count > 0 Then
    Dim Ent As AeccContour
    Set Ent = ss.Item(0)
    Ent.AddLabelAt Point(0), Point(1)
    ss.Clear
    Set Ent = Nothing
    EndIf
    Next Point

    Jeff
     
    Jeff Mishler, Aug 26, 2003
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.