How to read current Initget bits value and Keywords string?

How to read current Initget bits value and Keywords string?

CodeDing
Advisor Advisor
1,171 Views
20 Replies
Message 1 of 21

How to read current Initget bits value and Keywords string?

CodeDing
Advisor
Advisor

Hello all,

 

Does anyone know if it's possible to read the current (initget ...) BITS value and KEYWORDS string via AutoLISP or Visual Lisp?

 

If you're asking "Why?", it's because it would be useful in creating your own (getxxx ...) function while utilizing an existing (getxxx ...) function inside of a while loop to account for invalid inputs (as current getxxx functions do).

 

So, for example, if I set initget somewhere in my code...

(initget 6 "Some Keywords")

... then I could read these values somehow..

Command: (setq bits (getvar '??????))
6
Command: (setq keywords (getvar '??????))
"Some Keywords"

 

Any help is appreciated.

Best,

~DD

0 Likes
1,172 Views
20 Replies
Replies (20)
Message 21 of 21

john.uhden
Mentor
Mentor
@CodeDing,
I see that now about getint.
But that's the beauty of what I showed you... You don't need to be limited
by what AutoCAD provides, and you don't need initget.
I know I may be steering you away from your original goal, but I really
think you'll be better off by redirecting your efforts.
It's sorta like when we were remodeling a room. I had dismissed the
contractor 'cause first I was almost out of money and second I can do
finish work better than most anyone. Anyway, I was struggling with my idea
of putting in a grid of boxed ceiling beams when my wife came home and
said, "I thought you were going to make it like you did in all the
bedrooms."
Aaahh, it was like the sun just burst through the clouds and angels were
hovering overhead.
It was the most fun I've ever had in my life.

John F. Uhden

0 Likes