??? re: Is it possible to make a single macro with multi com
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
??? re: Is it possible to make a single macro with multi com
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Drafting
Author Message
madcadd
Guest





Posted: Mon Mar 07, 2005 10:50 pm    Post subject: ??? re: Is it possible to make a single macro with multi com Reply with quote

I would like to know if anyone knows how to create a macro that can be toggled between 2 commands. That way I can make one button for any given "ON / OFF" situation instead of 2 buttons.

Back to top
Matt
Guest





Posted: Mon Mar 07, 2005 11:04 pm    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

I would say yes, I have a few that do 2,3 or more commands..what were you
thinking?
for example:
^C^C_snapstyl;0;_polarang;45; that I use along with -
^C^C_snapstyl;1;_polarang;30;

Matt

"madcadd" <nospam@address.withheld> wrote in message
news:32958220.1110217882830.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
I would like to know if anyone knows how to create a macro that can be
toggled between 2 commands. That way I can make one button for any given "ON

/ OFF" situation instead of 2 buttons.
Back to top
Dean Saadallah
Guest





Posted: Tue Mar 08, 2005 12:43 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

What command, or two?

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--

Back to top
Matt
Guest





Posted: Tue Mar 08, 2005 1:01 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

What version are you on? A lisp may be better. I don't know that you can
actually make a toggle command but I've been wrong before. Would have to be
something that can check the variable then decide what to do next.

Matt

"madcadd" <nospam@address.withheld> wrote in message
news:5545694.1110224754351.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Hi Matt,

And thanx for responding. Attached is a jpg showing the macro I made for
the DISPSILH command to change to 1 (on). I would like to make this ONE

button a toggle and add the DISPSILH command for (off) 0. But I don't know
how and currently would have to make 2 macros and 2 buttons.
Quote:

Looking at your example, I don't see it as being a TOGGLE, but rather
doing more than one thing with the click of one button. What I would like is

to have 2 commands on one button and hit it once for ON and again for OFF.
Do you think this can be done?
Quote:

I would have both of these commands on one button, but I already tried
this and it don't work.

^C^Cdispsilh;0;
^C^Cdispsilh;1;
Back to top
madcadd
Guest





Posted: Tue Mar 08, 2005 1:15 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Hi Dean,

See my post above with the jpg. What I am looking for is the ability to put two commands on the same button TOGGLING from one to the other. ie; DISPSILH 0, the DISPSILH 1.

Do you know if this can be achieved? Thanx for your help.
Back to top
madcadd
Guest





Posted: Tue Mar 08, 2005 1:19 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Thanx again Matt, but if I have to rely on a lisp, I'd just go with the two buttons. Just trying to conserve on real estate and avoid typing looooooooong words like dispsilh 'cause I aint the best on the ivories.
Back to top
Jason Rhymes
Guest





Posted: Tue Mar 08, 2005 2:08 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Yes, and you can do it with any seemlier variable that you need to toggle.
Just change the obvious.

^C^C(setvar "DISPSILH" (- 1 (getvar "DISPSILH")))

^C^C(setvar "TILEMODE" (- 1 (getvar "TILEMODE")))
Back to top
OLD-CADaver
Guest





Posted: Tue Mar 08, 2005 2:29 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Jason beat me to it. Also you can explore the lisp function BOOLE,

(setvar "GRIPBLOCK" (boole 6 (getvar "GRIPBLOCK") 1))
Back to top
Jason Rhymes
Guest





Posted: Tue Mar 08, 2005 2:30 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Off topic: Stopped in Bridge City yesterday on my way back from the Space
Center. I thought I'd see a house with OLD CADaver on the mail box
somewhere. But I never did.
Back to top
Rick Keller
Guest





Posted: Tue Mar 08, 2005 3:00 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Go with OLD-CADaver his wil toggle back & forth with one button.

Rick


"madcadd" <nospam@address.withheld> wrote in message
news:10069473.1110226773674.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Thanx again Matt, but if I have to rely on a lisp, I'd just go with the
two buttons. Just trying to conserve on real estate and avoid typing
looooooooong words like dispsilh 'cause I aint the best on the ivories.
Back to top
madcadd
Guest





Posted: Tue Mar 08, 2005 3:59 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Hi Jason,

Thank you very much. It works like a charm and I will be creating others by changing the obvious. Thank you!

What difference if any is there between your way and what OLD-CADaver posted just 21 minutes later than you? Would some commands lend themselves better with one way vs the other?

So you stopped in Bridge City yesterday on your way back from the Space Center and thought you'd see a house with OLD-CADaver on the mail box somewhere. But you never did.

You should have been looking for OLD-RANdall Culp on the mail box. ;-)
Back to top
madcadd
Guest





Posted: Tue Mar 08, 2005 4:03 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Hi OC,

Thanks for replying, but Jason beat you by 21 minutes and I already changed my macro and it works great.

What would you say is the difference between your way and Jason's?

I don't have time right now, but I will practice some with your method as well. Thanks again.
Back to top
Randall Culp
Guest





Posted: Tue Mar 08, 2005 10:01 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Nah that ain't on the mailbox either, back here it's just the road and
number. If you're out here, you know my name, if you don't know my name,
you don't need to be out here. Bridge City is the mail center, but I really
live well outside of town down on the bayou.

Lesee, Jason, if you were coming from Houston going though BC, you musta
been heading for "Bayou country" somewhere. Are you from Louisiana, or
further East? BTW, why in the world would you stop in BC? You musta been
buying gas or making a "pit stop" way out on the Interstate.

"madcadd" <nospam@address.withheld> wrote in message
news:8781910.1110236416151.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
Hi Jason,

Thank you very much. It works like a charm and I will be creating others
by changing the obvious. Thank you!

What difference if any is there between your way and what OLD-CADaver
posted just 21 minutes later than you? Would some commands lend themselves
better with one way vs the other?

So you stopped in Bridge City yesterday on your way back from the Space
Center and thought you'd see a house with OLD-CADaver on the mail box
somewhere. But you never did.

You should have been looking for OLD-RANdall Culp on the mail box. ;-)
Back to top
Randall Culp
Guest





Posted: Tue Mar 08, 2005 10:01 am    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

oops, forgot to answer the AutoCAD question... For toggling between two
options, there's nearly no difference in the two formats, boole may be
faster by a bazzillionth second but that's about it. Boole can be expanded
to in other uses to allow for a wider selection of operators.

"madcadd" <nospam@address.withheld> wrote in message
news:8781910.1110236416151.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
What difference if any is there between your way and what OLD-CADaver
posted just 21 minutes later than you? Would some commands lend themselves
better with one way vs the other?
Back to top
Jason Rhymes
Guest





Posted: Tue Mar 08, 2005 7:17 pm    Post subject: Re: ??? re: Is it possible to make a single macro with multi Reply with quote

Couldn't find much in the help file about it. Never used it before.
"Serves as a general bitwise Boolean function
(Boole operator int1 [int2 ...])"

I have some family in Port Neches and use to work at the Huntsman? plant
years ago when I did environmental work. I wanted to see what changed so we
took a detour down 87 to 82 along the gulf to see something different. I
live just outside of Lafayette in Duson La.
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Drafting All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB