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

Which is best: "Command" or "Entmake"

31 REPLIES 31
Reply
Message 1 of 32
Anonymous
394 Views, 31 Replies

Which is best: "Command" or "Entmake"

OK Guys it has been suggested this would provoke interesting discussion, so
which is the best to use?
Entmake seems to be more "elegant" programming and avoids standard prompts
etc. but is it really any better/worse than using command?
If this has already been done to death please tell me to nick off and point
me to the past thread(s) 🙂

cheers
Steve
31 REPLIES 31
Message 21 of 32
Anonymous
in reply to: Anonymous

My 2 cents: It depends. I've found that certain objects are created many
times faster via (command) than (entmake). As a purist though, I tend to
favor (entmake) because of the ability to force things like layer, linetype,
text height, obliquing angle, bulge (that's big one), and such. Doing a
"Find" on my collection of routines just now resulted in a propensity of the
use of (command) to insert blocks, then several to just (command "_.LIST")
objects to keep them highlighted while a user might zoom/pan.

Heed well the admonitions of mixing plain AutoLisp with Active-X.

--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juhden@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332

"Scribble" wrote in message
news:883CE4113CE1289D11B061C66E60531A@in.WebX.maYIadrTaRb...
> OK Guys it has been suggested this would provoke interesting discussion,
so
> which is the best to use?
> Entmake seems to be more "elegant" programming and avoids standard prompts
> etc. but is it really any better/worse than using command?
> If this has already been done to death please tell me to nick off and
point
> me to the past thread(s) 🙂
>
> cheers
> Steve
>
>
>
Message 22 of 32
Anonymous
in reply to: Anonymous

Thanks to all who replied.
Very informative and I guess I still have to decide each case on it's
merits.
As I'm fairly new to this newsgroup I had to load heaps more headers to get
the previous posts, but I have now read them.
Reading through past posts has shown a lot of effort CAN be put int
entmaking.
For what it's worth I attach a layer setting routine I wrote some time ago
where instead of creating layers from scratch I first get layer "0"'s entity
to modify. I'm sure this could be used in other instances to avoid syntax
errors?
Please realize this code is not optimised, I do realize there is a fair bit
of redundancy but similar to many of yourselves I was teaching myself as I
went and haven't gone back to "fix" something that works 🙂
cheers
Steve

John Uhden wrote in message
news:9C5B43F5ADB4ED3BEDAF47340E0CD3E1@in.WebX.maYIadrTaRb...
> My 2 cents: It depends. I've found that certain objects are created many
> times faster via (command) than (entmake). As a purist though, I tend to
> favor (entmake) because of the ability to force things like layer,
linetype,
> text height, obliquing angle, bulge (that's big one), and such. Doing a
> "Find" on my collection of routines just now resulted in a propensity of
the
> use of (command) to insert blocks, then several to just (command "_.LIST")
> objects to keep them highlighted while a user might zoom/pan.
Message 23 of 32
Anonymous
in reply to: Anonymous

Luis,

I recently discovered the old triple purge can be replaced with
(vla-purgeall (vla-get-activeDocument (vlax-get-acad-object))). I admit
though I haven't tested or compared results on the two methods of purging.
--
Cliff

"Luis Esquivel" wrote in message
news:AE21B4E4F43B548219B67F0E5A5BF6DC@in.WebX.maYIadrTaRb...
| O man, It must be something that have to be by opening a drawing from
| different versions 14.0 ->a2k adt no, and wait I also noticed that there
is
| a block name"", never had seen it could be the one causing the problem.
(and
| in the middle of that I call those routines I posted) hmmm.
|
| Thank you Jason, I'm preparing our detail library and I'm just start
noticed
| this.
|
| -Luis
|
| "Jason Piercey" wrote in message
| news:85490C6031E7F47B598274C854BD7EF6@in.WebX.maYIadrTaRb...
| > No crashes here, Luis.
| >
| > I load both routines.
| >
| > Run PA several times then issue S and AutoCAD is still alive.
| >
| > -Jason
| >
| >
| > Luis Esquivel wrote in message
| > news:85DBAC0D50090CB87FA0684F34D34E4F@in.WebX.maYIadrTaRb...
| > > Nothing to be with this thread but just as comment:
| > >
| > > How to make AutoCAD crash (very easy at least in my computer a2k adt,
| win
| > > pro, drawings in a network)
| > >
| > > Run this several times (+)
| > > (defun C:PA()(repeat 3 (command "_.purge" "_a" "*"
"_n"))(princ))(princ)
| > >
| > > and the call a macro like this
| > > (defun C:S () (command "qsave") (princ))
| > >
| > > -luis
| > >
| > >
| >
| >
|
|
Message 24 of 32
Anonymous
in reply to: Anonymous

No crashes here either. I do 3 purges every time I qsave, and have never had
it crash.

--
Ken Alexander
Acad2000
Win2000prof.

------------------------------------------
"Luis Esquivel" wrote in message
news:85DBAC0D50090CB87FA0684F34D34E4F@in.WebX.maYIadrTaRb...
> Nothing to be with this thread but just as comment:
>
> How to make AutoCAD crash (very easy at least in my computer a2k adt, win
> pro, drawings in a network)
>
> Run this several times (+)
> (defun C:PA()(repeat 3 (command "_.purge" "_a" "*" "_n"))(princ))(princ)
>
> and the call a macro like this
> (defun C:S () (command "qsave") (princ))
>
> -luis
>
>
Message 25 of 32
Anonymous
in reply to: Anonymous

For anyone new to using entmake these skeletons make help speed up writing
the code. They are old and a bit cruddy but its a place to start. I have a
similar file for dimensions (with the -3 group style overrides). It's even
cruddier; too big to post here. If anyone is interested I'll put it on the
customer files ng.

Maybe we could pass these around as a group, make additions/corrections, use
more descriptive/standardized variable names, add comments--whatever.
--
Cliff
Message 26 of 32
Anonymous
in reply to: Anonymous

Cliff,
Have you posted the dimension file to Customer Files? I have not been
able to find it. I am new at lisp and am very interested in learning how to
use entmake compared to command.
A great big THANKS to you and everyone else who so freely give their
time and knowledge to others in need. I, for one, could not have learned as
much as I have if it were not for all of you.


--
John R. Scott - CAD Tech.
ms consultants
Columbus, OH
Message 27 of 32
Anonymous
in reply to: Anonymous

Didn't crash for me in A2k or A2k2. I would suspect a reactor on your
system?

--
R. Robert Bell, MCSE
http://www.acadx.com


"Luis Esquivel" wrote in message
news:85DBAC0D50090CB87FA0684F34D34E4F@in.WebX.maYIadrTaRb...
| Nothing to be with this thread but just as comment:
|
| How to make AutoCAD crash (very easy at least in my computer a2k adt, win
| pro, drawings in a network)
|
| Run this several times (+)
| (defun C:PA()(repeat 3 (command "_.purge" "_a" "*" "_n"))(princ))(princ)
|
| and the call a macro like this
| (defun C:S () (command "qsave") (princ))
|
| -luis
|
|
Message 28 of 32
Anonymous
in reply to: Anonymous

"Cliff Middleton" wrote in message
news:4A51351F844F6120AE77DD8B0F6E2A3E@in.WebX.maYIadrTaRb...
> Luis,
>
> I recently discovered the old triple purge can be replaced with
> (vla-purgeall (vla-get-activeDocument (vlax-get-acad-object))). I admit
> though I haven't tested or compared results on the two methods of purging.
> --

I know about this Cliff, I stop using this approach because causes to delete
new layouts, even if you do a save.

Test:
Create new layouts
(vla-purgeall (vla-get-activeDocument (vlax-get-acad-object)))
command: regen

The problem was coming from a release 14.0 block, with a blockname "" and
after runining a audit and then later using the 3 times purge all (also
cause the crash).

Solved! Thank you all and sorry for getting out of the scope of this thread.

Regards,
-Luis
Message 29 of 32
Anonymous
in reply to: Anonymous

You are the first to ask. Look for thread "dim skeletons" in cf.
--
Cliff

"John Scott" wrote in message
news:30236DB9180C0ACAFEE33FCDCCC52027@in.WebX.maYIadrTaRb...
| Cliff,
| Have you posted the dimension file to Customer Files? I have not been
| able to find it. I am new at lisp and am very interested in learning how
to
| use entmake compared to command.
| A great big THANKS to you and everyone else who so freely give their
| time and knowledge to others in need. I, for one, could not have learned
as
| much as I have if it were not for all of you.
|
|
| --
| John R. Scott - CAD Tech.
| ms consultants
| Columbus, OH
|
|
Message 30 of 32
Anonymous
in reply to: Anonymous

Cliff,
Thank you very much for posting that. I appreciate it a lot.


--
John R. Scott - CAD Tech.
ms consultants
Columbus, OH
Message 31 of 32
Anonymous
in reply to: Anonymous

Disclaimer. It is working code pulled out of old routines written for R14
originally. Variable names may or may not make sense and of course are
undefined in your code. Some problems (goofiness) may (OK, will) occur in
A2K+. It's only for starters.
--
Cliff

"John Scott" wrote in message
news:48D075565F7CA322DFDB32A7F72FF4CB@in.WebX.maYIadrTaRb...
| Cliff,
| Thank you very much for posting that. I appreciate it a lot.
|
|
| --
| John R. Scott - CAD Tech.
| ms consultants
| Columbus, OH
|
|
Message 32 of 32
Anonymous
in reply to: Anonymous

It's only for starters

HEY, that's me!!!!!


I intend to use it to assist me with learning how to create dimension
styles, as well as other entities. I have only recently begun writing lisp
and have used the Commands to create. I already know that seems to be the
"hard" way of doing things. I also want to expand upon my knowledge as much
as I can.

Thanks again for your help.

--
John R. Scott - CAD Tech.
ms consultants
Columbus, OH

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

Post to forums  

Autodesk Design & Make Report

”Boost