OSNAP settings/mods

Discussion in 'AutoCAD' started by DRW1975, Feb 8, 2005.

  1. DRW1975

    DRW1975 Guest

    Is there a way to have SOME entities in a drawing that WILL NOT be snapped to?

    I have created a routine that shows symbols at certain point - these symbols are a group of lines and circles that I would prefer the user cannot grip onto when making a selection... Can I put them in a layer that cannot be gripped?? or something like that (kind of like a transparency)? I realize that this is not quite a VBA question, but more a general AutoCAD question, but I thought I would try here first since it is part of a VBA routine...

    If i must, I will use something like images instead of ACAD entities to make up my symbols, but i would prefer just to use the ACAD entities...


    DRW
     
    DRW1975, Feb 8, 2005
    #1
  2. DRW1975

    Oberer Guest

    you could:
    put them on a locked layer
    edit your routine to only allow certain layer/objects to be selected
     
    Oberer, Feb 8, 2005
    #2
  3. DRW1975

    DRW1975 Guest

    Fair enough, I can put logic in to that effect, but AC will still want to snap to the objects eventhough they may be on a locked layer... It would be up to my code to come back with a statement like - object not selectable - or something like that... But now that I think about the problem.... i could turn OSNAP off all together, leave the user to select a non-snapped point, and use an algorithm to assess the nearest selectable point that the user has picked ! I think that will suit my purposes just fine...

    well thanks for this, eventhough the answer wasn't quite what i was looking for, but it seems to have yielded a different one regardless.

    DRW
     
    DRW1975, Feb 8, 2005
    #3
  4. Are you interested in preventing the user from object-snapping
    to certain entities, or selecting certain entities (or both)?
     
    Tony Tanzillo, Feb 8, 2005
    #4
  5. DRW1975

    Oberer Guest

    hey drw1975, I'm a little confused. You said "when making a selection", but then you're using osnaps? Are your users selecting a point or making a selection set?

    if it's the latter, i'm sorry for offering the filter suggestion. I was under the impression at first that you wanted to exclude the objects from the sel set.

    "i could turn OSNAP off all together, leave the user to select a non-snapped point, and use an algorithm to assess the nearest selectable point that the user has picked "

    You seem to know exactly what they'd be after as well as what objects to exclude, so it sounds like you've found your answer...
     
    Oberer, Feb 8, 2005
    #5
  6. DRW1975

    DRW1975 Guest

    I am prompting a user to select a single point in model space, but I do not want a user to be able to OSnap onto any point, only specific ones. There is no entity selection, only a user '.getpoint' function to get a set of coordinates.

    It seems that I've managed to come up with an alternative that will work equally as good though.

    thanks

    DRW
     
    DRW1975, Feb 8, 2005
    #6
  7. You're using the wrong function in that case.

    Use GetEntity, and compute the point from the
    selected object's geometric properties.
     
    Tony Tanzillo, Feb 8, 2005
    #7
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.