Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

In Acad R2000 How do I avoid dialog box with tool button?

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
173 Views, 6 Replies

In Acad R2000 How do I avoid dialog box with tool button?

Hi All,

In R14 I had tool buttons and lisp routines to change a dimension.
Example routine: ^C^CDIM;N;%%P;<>;VIF;

When I use the same routine in R2000 I get a dialog box.
How would I write the routines to avoid the dialog box?

Thank you in advance,
Al
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

So how'd I do?

(setq DIM1 (SSGET '((0 . "DIMENSION"))) ;promts user to pick dim
DIM1 (ENTGET (SSNAME DIM1 0));gets the entity name from selection set
DIM1(SUBST (CONS 1 "<>\\PVIF") (ASSOC 1 DIM1) DIM1) ;substitutes the
dim value
)
(ENTMOD DIM1);makes the change
(PRINC); exits quietly

"johnal" wrote in message
news:517C5EA48B264DACA128DF1577015CB2@in.WebX.maYIadrTaRb...
> Hi All,
>
> In R14 I had tool buttons and lisp routines to change a dimension.
> Example routine: ^C^CDIM;N;%%P;<>;VIF;
>
> When I use the same routine in R2000 I get a dialog box.
> How would I write the routines to avoid the dialog box?
>
> Thank you in advance,
> Al
>
>
>
Message 3 of 7
Anonymous
in reply to: Anonymous

Actually, this is better - lets you pick one or a bunch:

(setq DIMSS (SSGET '((0 . "DIMENSION"))))
(setq c -1)
(repeat (sslength DIMSS)
(setq DTX (ENTGET (SSNAME DIMSS (setq c (1+ c)))))
(setq DTX (SUBST (CONS 1 "<> TYP") (ASSOC 1 DTX) DTX)
)
(ENTMOD DTX)
)
(PRINC)



"pkirill" wrote in message
news:6810D81702B06C51E66CA8DF79A25293@in.WebX.maYIadrTaRb...
> So how'd I do?
>
> (setq DIM1 (SSGET '((0 . "DIMENSION"))) ;promts user to pick dim
> DIM1 (ENTGET (SSNAME DIM1 0));gets the entity name from selection
set
> DIM1(SUBST (CONS 1 "<>\\PVIF") (ASSOC 1 DIM1) DIM1) ;substitutes the
> dim value
> )
> (ENTMOD DIM1);makes the change
> (PRINC); exits quietly
>
> "johnal" wrote in message
> news:517C5EA48B264DACA128DF1577015CB2@in.WebX.maYIadrTaRb...
> > Hi All,
> >
> > In R14 I had tool buttons and lisp routines to change a dimension.
> > Example routine: ^C^CDIM;N;%%P;<>;VIF;
> >
> > When I use the same routine in R2000 I get a dialog box.
> > How would I write the routines to avoid the dialog box?
> >
> > Thank you in advance,
> > Al
> >
> >
> >
>
>
Message 4 of 7
Anonymous
in reply to: Anonymous

Thanks for responding pkirill.

I will use this when I go back into Lisp but right now I need a routine for
a custom tool button. Is there a simple routine like the example I listed??

Al




"pkirill" wrote in message
news:D796B87FA264A630094057E7DDAEA4FB@in.WebX.maYIadrTaRb...
> Actually, this is better - lets you pick one or a bunch:
>
> (setq DIMSS (SSGET '((0 . "DIMENSION"))))
> (setq c -1)
> (repeat (sslength DIMSS)
> (setq DTX (ENTGET (SSNAME DIMSS (setq c (1+ c)))))
> (setq DTX (SUBST (CONS 1 "<> TYP") (ASSOC 1 DTX) DTX)
> )
> (ENTMOD DTX)
> )
> (PRINC)
>
>
>
> "pkirill" wrote in message
> news:6810D81702B06C51E66CA8DF79A25293@in.WebX.maYIadrTaRb...
> > So how'd I do?
> >
> > (setq DIM1 (SSGET '((0 . "DIMENSION"))) ;promts user to pick dim
> > DIM1 (ENTGET (SSNAME DIM1 0));gets the entity name from selection
> set
> > DIM1(SUBST (CONS 1 "<>\\PVIF") (ASSOC 1 DIM1) DIM1) ;substitutes
the
> > dim value
> > )
> > (ENTMOD DIM1);makes the change
> > (PRINC); exits quietly
> >
> > "johnal" wrote in message
> > news:517C5EA48B264DACA128DF1577015CB2@in.WebX.maYIadrTaRb...
> > > Hi All,
> > >
> > > In R14 I had tool buttons and lisp routines to change a dimension.
> > > Example routine: ^C^CDIM;N;%%P;<>;VIF;
> > >
> > > When I use the same routine in R2000 I get a dialog box.
> > > How would I write the routines to avoid the dialog box?
> > >
> > > Thank you in advance,
> > > Al
> > >
> > >
> > >
> >
> >
>
>
Message 5 of 7
Anonymous
in reply to: Anonymous

Just put all this code on one line with no spaces between ")" and "(" and
put a semi-colon at the end (I changed it below). Click the button. For a
cleaner execution you can make it a LISP, but this works.


"johnal" wrote in message
news:0A019EAF788EB80D81A0EE245B49E4F1@in.WebX.maYIadrTaRb...
> Thanks for responding pkirill.
>
> I will use this when I go back into Lisp but right now I need a routine
for
> a custom tool button. Is there a simple routine like the example I
listed??
>
> Al
>
>
>
>
> "pkirill" wrote in message
> news:D796B87FA264A630094057E7DDAEA4FB@in.WebX.maYIadrTaRb...
> > Actually, this is better - lets you pick one or a bunch:
> >
> > (setq DIMSS (SSGET '((0 . "DIMENSION"))))(setq c -1)(repeat (sslength
DIMSS)(setq DTX (ENTGET (SSNAME DIMSS (setq c (1+ c)))))(setq DTX (SUBST
(CONS 1 "<> TYP")(ASSOC 1 DTX) DTX))(ENTMOD DTX))(PRINC);
> >
> >
> >
> > "pkirill" wrote in message
> > news:6810D81702B06C51E66CA8DF79A25293@in.WebX.maYIadrTaRb...
> > > So how'd I do?
> > >
> > > (setq DIM1 (SSGET '((0 . "DIMENSION"))) ;promts user to pick dim
> > > DIM1 (ENTGET (SSNAME DIM1 0));gets the entity name from
selection
> > set
> > > DIM1(SUBST (CONS 1 "<>\\PVIF") (ASSOC 1 DIM1) DIM1) ;substitutes
> the
> > > dim value
> > > )
> > > (ENTMOD DIM1);makes the change
> > > (PRINC); exits quietly
> > >
> > > "johnal" wrote in message
> > > news:517C5EA48B264DACA128DF1577015CB2@in.WebX.maYIadrTaRb...
> > > > Hi All,
> > > >
> > > > In R14 I had tool buttons and lisp routines to change a dimension.
> > > > Example routine: ^C^CDIM;N;%%P;<>;VIF;
> > > >
> > > > When I use the same routine in R2000 I get a dialog box.
> > > > How would I write the routines to avoid the dialog box?
> > > >
> > > > Thank you in advance,
> > > > Al
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Message 6 of 7
Anonymous
in reply to: Anonymous

Thanks pkirill,

This routine worked fine.

I can't believe all this is needed for R2000 and just a simple line for R14.

Al


"pkirill" wrote in message
news:899F98D61D1FE2751795755B3642AF0F@in.WebX.maYIadrTaRb...
> Just put all this code on one line with no spaces between ")" and "(" and
> put a semi-colon at the end (I changed it below). Click the button. For
a
> cleaner execution you can make it a LISP, but this works.
>
>
> "johnal" wrote in message
> news:0A019EAF788EB80D81A0EE245B49E4F1@in.WebX.maYIadrTaRb...
> > Thanks for responding pkirill.
> >
> > I will use this when I go back into Lisp but right now I need a routine
> for
> > a custom tool button. Is there a simple routine like the example I
> listed??
> >
> > Al
> >
> >
> >
> >
> > "pkirill" wrote in message
> > news:D796B87FA264A630094057E7DDAEA4FB@in.WebX.maYIadrTaRb...
> > > Actually, this is better - lets you pick one or a bunch:
> > >
> > > (setq DIMSS (SSGET '((0 . "DIMENSION"))))(setq c -1)(repeat (sslength
> DIMSS)(setq DTX (ENTGET (SSNAME DIMSS (setq c (1+ c)))))(setq DTX (SUBST
> (CONS 1 "<> TYP")(ASSOC 1 DTX) DTX))(ENTMOD DTX))(PRINC);
> > >
> > >
> > >
> > > "pkirill" wrote in message
> > > news:6810D81702B06C51E66CA8DF79A25293@in.WebX.maYIadrTaRb...
> > > > So how'd I do?
> > > >
> > > > (setq DIM1 (SSGET '((0 . "DIMENSION"))) ;promts user to pick dim
> > > > DIM1 (ENTGET (SSNAME DIM1 0));gets the entity name from
> selection
> > > set
> > > > DIM1(SUBST (CONS 1 "<>\\PVIF") (ASSOC 1 DIM1) DIM1)
;substitutes
> > the
> > > > dim value
> > > > )
> > > > (ENTMOD DIM1);makes the change
> > > > (PRINC); exits quietly
> > > >
> > > > "johnal" wrote in message
> > > > news:517C5EA48B264DACA128DF1577015CB2@in.WebX.maYIadrTaRb...
> > > > > Hi All,
> > > > >
> > > > > In R14 I had tool buttons and lisp routines to change a dimension.
> > > > > Example routine: ^C^CDIM;N;%%P;<>;VIF;
> > > > >
> > > > > When I use the same routine in R2000 I get a dialog box.
> > > > > How would I write the routines to avoid the dialog box?
> > > > >
> > > > > Thank you in advance,
> > > > > Al
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Message 7 of 7
Anonymous
in reply to: Anonymous

No joke! I'm glad you brought it up, though. Back in release 12 we had
screen menus to do the same thing and were very upset when we upgraded to 14
and lost them. Never bothered to look for another solution. So thanks!


"johnal" wrote in message
news:3E75BC0D3FD5DDD2E05339E59F9AC2C3@in.WebX.maYIadrTaRb...
> Thanks pkirill,
>
> This routine worked fine.
>
> I can't believe all this is needed for R2000 and just a simple line for
R14.
>
> Al
>
>
> "pkirill" wrote in message
> news:899F98D61D1FE2751795755B3642AF0F@in.WebX.maYIadrTaRb...
> > Just put all this code on one line with no spaces between ")" and "("
and
> > put a semi-colon at the end (I changed it below). Click the button.
For
> a
> > cleaner execution you can make it a LISP, but this works.
> >
> >
> > "johnal" wrote in message
> > news:0A019EAF788EB80D81A0EE245B49E4F1@in.WebX.maYIadrTaRb...
> > > Thanks for responding pkirill.
> > >
> > > I will use this when I go back into Lisp but right now I need a
routine
> > for
> > > a custom tool button. Is there a simple routine like the example I
> > listed??
> > >
> > > Al
> > >
> > >
> > >
> > >
> > > "pkirill" wrote in message
> > > news:D796B87FA264A630094057E7DDAEA4FB@in.WebX.maYIadrTaRb...
> > > > Actually, this is better - lets you pick one or a bunch:
> > > >
> > > > (setq DIMSS (SSGET '((0 . "DIMENSION"))))(setq c -1)(repeat
(sslength
> > DIMSS)(setq DTX (ENTGET (SSNAME DIMSS (setq c (1+ c)))))(setq DTX (SUBST
> > (CONS 1 "<> TYP")(ASSOC 1 DTX) DTX))(ENTMOD DTX))(PRINC);
> > > >
> > > >
> > > >
> > > > "pkirill" wrote in message
> > > > news:6810D81702B06C51E66CA8DF79A25293@in.WebX.maYIadrTaRb...
> > > > > So how'd I do?
> > > > >
> > > > > (setq DIM1 (SSGET '((0 . "DIMENSION"))) ;promts user to pick dim
> > > > > DIM1 (ENTGET (SSNAME DIM1 0));gets the entity name from
> > selection
> > > > set
> > > > > DIM1(SUBST (CONS 1 "<>\\PVIF") (ASSOC 1 DIM1) DIM1)
> ;substitutes
> > > the
> > > > > dim value
> > > > > )
> > > > > (ENTMOD DIM1);makes the change
> > > > > (PRINC); exits quietly
> > > > >
> > > > > "johnal" wrote in message
> > > > > news:517C5EA48B264DACA128DF1577015CB2@in.WebX.maYIadrTaRb...
> > > > > > Hi All,
> > > > > >
> > > > > > In R14 I had tool buttons and lisp routines to change a
dimension.
> > > > > > Example routine: ^C^CDIM;N;%%P;<>;VIF;
> > > > > >
> > > > > > When I use the same routine in R2000 I get a dialog box.
> > > > > > How would I write the routines to avoid the dialog box?
> > > > > >
> > > > > > Thank you in advance,
> > > > > > Al
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost