Jump to content

Need a lisp....... Lee Mac this ones for you


MikeP

Recommended Posts

I started to look at the code in v3 but i got so confused i had to stop. However, while i had the file open i noticed a lot of osnap checking and conditions and whatnot so i thought i would toss this out there to see if it could help.

 

If all you want is to ensure the osnaps are off when they are supposed to be then you can use boole 3 in a quick toggle procedure.

 

REMOVED: its wrong

 

 

 

HTH

Link to comment
Share on other sites

  • Replies 94
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    35

  • MikeP

    31

  • CAB

    11

  • Se7en

    9

Top Posters In This Topic

Posted Images

Your not setting the osmode to 1. Did you try it? ... never mind. Here is a real quick explanation to its inner workings (A real quick "Flipping bits" lesson).

 

If my current osmode value was say 247 then this is how it would look in binary notation.

 

16384:   1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
247:     0 0 0 0 0 0 0 1 1 1 1 0 1 1 1
        ^
        |
        +----- I'm "flipping" this bit in the current osmode value

 

Flipping the 16384 bit is like hitting .

 

Hows that sound? Cool huh? I'll find an article which will explain it better.

 

brb (be right back).

Link to comment
Share on other sites

Your not setting the osmode to 1. Did you try it? ... never mind. Here is a real quick explanation to its inner workings (A real quick "Flipping bits" lesson).

 

If my current osmode value was say 247 then this is how it would look in binary notation.

 

16384:   1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
247:     0 0 0 0 0 0 0 1 1 1 1 0 1 1 1
        ^
        |
        +----- I'm "flipping" this bit in the current osmode value

Flipping the 16384 bit is like hitting .

 

Hows that sound? Cool huh? I'll find an article which will explain it better.

 

brb (be right back).

 

Yes, I tried it, and I could only get it to set OSMODE to 0 or 1... hence my queries..

 

I understand your logic and yes that is pretty cool :)

Link to comment
Share on other sites

Sorry, had a fire to put out here (and lunch).

 

Yeah, i screwed up. Im sorry.

 

Would this be better? Its not Boole 3...its more like Boole 2 or 7 depending but the same concept.

(defun toggleOsnap (value)
 ;; if `value' = 1 then turn osnaps off
 ;; if `value' = 0 then turn osnaps on
 ;;
 (setvar "OSMODE" (boole (+ 2 (* value 5)) (getvar "OSMODE") 16384))
 (princ)
)

Link to comment
Share on other sites

Mike try this:

 

V1.3 : Added options to change line dimensions.

 

 

Thats perfect, but it only lets you change the vertical offset

Link to comment
Share on other sites

Everything works fine for me... :huh:

 

 

The drop down after change defaults only list exit and V. Should it list the other values as well? after I change the V, it goes back to "exit & V" If I click exit, it goes into point selection

Link to comment
Share on other sites

never mind, I just realized what i was missing, on the screen, the dropdown down not include the other values, but in the command line it does. All is well now

 

Thanks alot man

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...