Any sysvars that can affect ssget?

Discussion in 'AutoCAD' started by liftedaxis, Mar 16, 2005.

  1. liftedaxis

    liftedaxis Guest

    We had a most unusual tech problem, which finally got resolved by resetting all System Variables. Unfortunately, it leaves me in the position of not knowing which sysvar caused the problem in the first place.
    Check this code out:
    (setq cross1 (polar p2 DEG45 (/ (getvar "VIEWSIZE") 60.0)) ; about 1/60th of screen
    cross2 (polar p2 DEG225 (/ (getvar "VIEWSIZE") 60.0))
    tempset (ssget "C" cross1 cross2 (list (cons 0 "INSERT") ))
    ) ; setq
    this snippet was working fine, able to find the closest block to where the user had clicked.
    Yet, if unable to find a block, the next code executes:
    (setq cross1 (polar p2 DEG45 (/ (getvar "VIEWSIZE") 30.0)) ; about 1/30th of screen
    cross2 (polar p2 DEG225 (/ (getvar "VIEWSIZE") 30.0))
    tempset (ssget "C" cross1 cross2 (list (cons 0 "LWPOLYLINE")))
    ) ; setq
    this time, obviously the code is looking for the nearest Polyline (and is further looking for a 0-length poly, where (zerop (distance (cdr (assoc 10 px)) (cdr (assoc 10 (reverse px))))).
    Yet it wasn't finding any 0-length poly's. Set the system variables, and suddenly it's finding them again no problem.

    I'm pretty much at a total loss, I'm not seeing any lines of code that could possibly be affected by a system variable. Further, the code that is looking for a block is essentially the exact same code, and it was working fine with the ill-advised sysvar setting.

    Hope this made sense. Much appreciate any assistance.

    --Jeremiah
     
    liftedaxis, Mar 16, 2005
    #1
  2. liftedaxis

    BillZ Guest

    OSMODE is most likely your problem.

    Need to = 0 for point picks.


    Bill
     
    BillZ, Mar 16, 2005
    #2
  3. liftedaxis

    liftedaxis Guest

    If I was picking points, I'd agree with you. but it's an ssget Crossing, which isn't affected by Osmode. Regardless, already set to 0 for other reasons elsewhere in the routine.

    --J
     
    liftedaxis, Mar 16, 2005
    #3
  4. liftedaxis

    Jamie Duncan Guest

    uh uh, and where did pt2 come from?
     
    Jamie Duncan, Mar 16, 2005
    #4
  5. liftedaxis

    liftedaxis Guest

    p2 comes from a grread.

    --J
     
    liftedaxis, Mar 16, 2005
    #5
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.