Author Topic: Osnap - magnet behavior  (Read 2768 times)

0 Members and 1 Guest are viewing this topic.

Biscuits

  • Swamp Rat
  • Posts: 502
Osnap - magnet behavior
« on: October 27, 2006, 12:34:47 PM »
We're using ACAD2002 with Windows XP Professional.
My enclosed balloon or item indicator routine has been working fine for the last year or more on several PC's here at work.

Quote
(defun c:bln-a (/ cc in is)
(prompt "Balloon")
       (command "dimasz" ".09375")
          (command "LAYER" "SET" "DIM" "")
             (command "dimldrblk" ".")

    (setq cmd (getvar "cmdecho"))
    (setvar "osmode" 512)
    (setvar "cmdecho" 0)
     
     (terpri)(setq is (getpoint "Start point of Leader:"))
     (terpri)(setq cc (getpoint is "Center of Balloon:"))


     (terpri)(setq ds (getvar "dimscale"))
     (terpri)(setq th (getvar "dimtxt"))
     (terpri)(setq cd (getvar "dimdli"))
     (terpri)(setq rad (* th 3))
     (terpri)(setq txt (* th ds))
     (terpri)(setq dia (* rad ds))
     (command ".circle" cc "d" dia)
 (COMMAND "-STYLE" "STANDARD" "" "" "" "" "" "" "")

   (command "Qleader" is (polar is (angle is cc)
                         (-(distance is cc)(/ dia 2))) c^c^)
     (terpri)(setq in (getstring "Text in Balloon:"))

   (command ".text" "m" cc txt 0 in)

    (setvar "cmdecho" cmd)
    (setvar "osmode" 47)

   
 (princ)
)



Recently a problem has developed when using this routine.
When the routine inserts the text in the bubble, (new developement) it doesn't always place it centered in the circle.
What seems to make the difference is how far the user is zoomed in or out at the moment of text placement. It doesn't matter where the mouse or cross-hairs are position. When the routine doesn't work properly, we end up with the text inserted on a quadrant of the circle or end point of the leader. It's as if zooming out affects the magnetic strength of an osnap that's not even active at the time.

This doesn't matter if it's a new drawing, old drawing, or who's PC is being used. We all have individual menus and lisp routines. Not network shared. After careful checking, the only common denominator I can find is - an outdated CAD program coupled with Windows operating system updates.

Any ideas to help find a solution would be greatly appreciated.
And yes, I've already thought of the Sledge-omatic!
Thanks

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Osnap - magnet behavior
« Reply #1 on: October 27, 2006, 12:52:34 PM »
Try using "_non" before a point within a command to defeat the osnap!
Code: [Select]
(defun c:bln-a (/ cc in is)
  (prompt "Balloon")
  (command "dimasz" ".09375")
  ;(command "LAYER" "SET" "DIM" "")
  (command "dimldrblk" ".")

  (setq cmd (getvar "cmdecho"))
  (setvar "osmode" 512)
  (setvar "cmdecho" 0)

  (terpri)
  (setq is (getpoint "Start point of Leader:"))
  (terpri)
  (setq cc (getpoint is "Center of Balloon:"))


  (terpri)
  (setq ds (getvar "dimscale"))
  (terpri)
  (setq th (getvar "dimtxt"))
  (terpri)
  (setq cd (getvar "dimdli"))
  (terpri)
  (setq rad (* th 3))
  (terpri)
  (setq txt (* th ds))
  (terpri)
  (setq dia (* rad ds))
  (command ".circle" "_non" cc "d" dia)
  (command "-STYLE" "STANDARD" "" "" "" "" "" "" "")

  (command "Qleader"
           "_non"
           is
           "_non"
           (polar is
                  (angle is cc)
                  (- (distance is cc) (/ dia 2))
           )
           c^c^
  )
  (terpri)
  (setq in (getstring "Text in Balloon:"))

  (command ".text" "m" "_non" cc txt 0 in)

  (setvar "cmdecho" cmd)
  (setvar "osmode" 47)


  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Guest

  • Guest
Re: Osnap - magnet behavior
« Reply #2 on: October 27, 2006, 12:59:27 PM »
CAB, you beat me to it!!

I was going to suggest setting OSMODE to 0 prior to the program placing the text because OSMODE 512 (nearest) is still on at that point.

Biscuits

  • Swamp Rat
  • Posts: 502
Re: Osnap - magnet behavior
« Reply #3 on: October 27, 2006, 01:23:47 PM »
That did it CAB!!!

Many thanks.

Again you have bailed me aout of a tricky situation.

Thanks to you as well, Matt

Ya'll have a good weekend

Guest

  • Guest
Re: Osnap - magnet behavior
« Reply #4 on: October 27, 2006, 01:33:18 PM »
Quote
Ya'll have a good weekend
Right back-atcha, Biscuits.


(drolling) Mmmmmm...... biscuits......   and gravy.......

Biscuits

  • Swamp Rat
  • Posts: 502
Re: Osnap - magnet behavior
« Reply #5 on: October 27, 2006, 01:43:58 PM »
Sounds like you'll like my recipe!

Quote

Sausage Gravy (for Biscuits & Gravy)

Submitted By:    Darby Anderson      Omaha        Main Office

Ingredients:

Jimmy Dean HOT Sausage – 3 tubes
Butter (the real stuff) – 1 stick
Flour - amounts vary
Whole Milk  - amounts vary
Black pepper – to your liking

Directions:

Brown sausage – breaking up into small pieces (I use a potato masher)
Drain all grease into deep heavy pan, add butter, and place over medium heat

The next stages happen fast so be sure to have flour and milk handy and be prepared to stir constantly

Once butter has melted, slowly add flour stirring constantly until a thick paste has formed
       It should almost look like “Playdough” at this point 
Slowly add milk about ¼ cup at a time to thin the paste - again stir constantly
        When gravy thickens add another ¼ cup of milk
         Repeat until the consistency you like has been achieved
         A pinch of salt added to the gravy can help avoid any flour-like taste

Add sausage to gravy, stir in black pepper to taste, and remove from heat


NOTE: This takes practice to perfect and may require adjusting your heat settings & how the flour & milk are added to the mixture. If the gravy is scorched or lumpy, try more stirring and/or lower the heat next time

Serve over biscuits or toast

This recipe in guaranteed to meet the adult daily requirements of saturated fats & cholesterol. This is the price you pay for FLAVOR


Serving Size: 12 +/-
Calories:  Daily requirements and then some
Fat: Oh yeah
Fiber:  Never crossed my mind
Weight Watcher Points: Don’t even ask


pmvliet

  • Guest
Re: Osnap - magnet behavior
« Reply #6 on: October 29, 2006, 02:17:51 PM »
Sounds like you'll like my recipe!

I will say that I made this Sunday morning and oh was it good. I didn't use the hot sausage
as I'm not a totally hot spice person, but it was really good. I only made 1 roll as well
and that made plenty!

Thanks for the recipe

Pieter

Biscuits

  • Swamp Rat
  • Posts: 502
Re: Osnap - magnet behavior
« Reply #7 on: October 31, 2006, 02:44:14 PM »
Glad ya liked it!