Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating an isolate routine

50 views
Skip to first unread message

Marcel Janmaat

unread,
Apr 29, 2004, 5:06:24 AM4/29/04
to
I want to create a line over objects i am selecting wich may consist of
lines, arcs, plines, (sometimes within blocks) etc. like with the ncopy
command. and then offset it.

The problem is, I cannot use the ncopy command within my own lisp.

Has anyone maby got any suggestions on how to accomplish this???

MJ


John Uhden

unread,
Apr 29, 2004, 9:19:23 PM4/29/04
to
Sorry I can't give it to you. Cadlantic has an XOFFSET routine to do exactly
what you want, and more. The primary mechanism is to use (entmake) to enable
the offspring to have user-selected properties at birth. Yes, there is a
downloadable evaluation version.

--
John Uhden, Cadlantic
<the e-mail address is bogus>
http://www.cadlantic.com
Sea Girt, NJ

"Marcel Janmaat" <m.ja...@hiensch.nl> wrote in message
news:4090c5f6_3@newsprd01...

Tony Tanzillo

unread,
Apr 30, 2004, 8:11:18 AM4/30/04
to
This isn't exactly rocket science.

Just use the vla-Explode method on the block insertions.
It returns an array of primitives created by exploding,
which you can erase or manipulate as top level entities
The explode method doesn't erase the original object
either, and preserves any application data attached to
them. That's essentially what ncopy does, except that
it doesn't have to erase uninterested objects, since it
gets to decide which are added to the drawing, and which
are not. That luxury requires ObjectARX.

<advice>

Using largely obsolete methodologies like (entmake) as a
means of duplication (whether it is for the purpose of
exploding or any other type of 'copy'), is no longer
regarded as a viable or robust approach, because it does
not 'play nice' with other user applications and the data
they may associate with objects.

If for example, the objects contained in your blocks
have some application data attached to them (in the form
of an XDictionary with XRecords, for example) the Explode
method already knows how to copy and transform that data,
unlike entmake/entget based methods. A similar problem
related to the "entmake-approach" is that it breaks any
inter-object reference stored in private application data.

Although your particular circumstances may not make any
of this an issue, that doesn't serve to legitimize using
an inferior approach when there are better/other ways to
acheive the objective, that take into account many of the
issues mentioned above, as well as a few others.

</advice>

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com


"Marcel Janmaat" <m.ja...@hiensch.nl> wrote in message news:4090c5f6_3@newsprd01...

John Uhden

unread,
Apr 30, 2004, 10:20:38 PM4/30/04
to
It may be your opinion that one wants to preserve all the data attached to the
original object, but that's not an indicator of right or wrong; it's just your
opinion. Most here preface such statements with "IMHO" or less humbly "IMO."
Just maybe one wants to clone an object free from its ancestor's properties
except for simple geometry, and avoid the need for deleting, and perhaps
purging, the excess baggage created by copying. Maybe I've missed something,
but I don't think xrefs are explodable, or that entmake has been retired.

While I truly respect your experience, I detest your responses that are aimed
purposefully at belittling contributors such as myself with your "holier than
thou" attitude, accusations of inferiority, and contrived admonitions. If the
programmer wishes, he can include the associations that you claim will be
broken.

It's a shame you demean yourself by demeaning others. IMHO, an opposite
approach would serve us all much better.

--
John Uhden, Cadlantic
<the e-mail address is bogus>
http://www.cadlantic.com
Sea Girt, NJ

"Tony Tanzillo" <tony.t...@bogus.com> wrote in message
news:4092419c$1_1@newsprd01...

Tony Tanzillo

unread,
May 1, 2004, 9:39:05 AM5/1/04
to
"John Uhden" <juh...@cadlantic.com> wrote in message news:40930956$1_2@newsprd01...

> It may be your opinion that one wants to preserve

> all the data attached to the original object...

Excuse me...

Regardless of what you may have to say about my comments,
fact of the matter is that a simple request for help with
a minor programming problem posted in the customization
newsgroup, was met with a response that is not in the
least bit constructive; and amounts to nothing but a crude
sales pitch, complete with a really scary comment about
the use of (entmake), which on the surface, would easily
mislead a less-experienced coder into believing that any
solution to the NCOPY problem is far more complicated than
it actually is.

Remember, this is not an end-user asking for a canned
solution. This is a person that's coding their own solution,
who has come here seeking help with a problem they're having.

This is the customization newsgroup. We don't peddle solutions
to coding problems here, like rug merchants at a bazaar.
We share knowledge and help others solve their problems with
hands-on help and code (using best practices if I might add),
and we do that, even when doing so may not be in our own
commercial interest.

Ask Terry Dotson how much fire he's drawn by proposing his
product as the means of solving a coding problem someone has
come here to ask for help with.

I simply made it clear that the poster can easily arrive
at the equivalent to the NCOPY functionality, without
having to spend $150 (do they get source code for that
outrageous price?), and can do it relatively easily with
the use of the Explode method.

Obviously, it is that aspect of my reply that you seem
to have the biggest problem with.

A. Fool

unread,
May 1, 2004, 11:07:38 AM5/1/04
to
Tony,
John has a point about the explode method. It won't work
on xrefs. O'course I'd be happy for you to prove that the
explode method can work on xrefs.

For activeX to work on xrefs, the copyobjects method is
necessary along with the transformby method. Of course,
if extreme care is not taken with those methods, the session
will crash. For instance, the copyobjects method can
create the new object copied from the xref database on a
layer <xrefname>|<layername>. That's fine until the xref
is detached and an attempt is made to save the current
drawing.....boom.

Perhaps, if the command opened the xref drawing as
a separate dbxdoc and then performed the copyobjects
operation, everything would play nice.

Entget/entmake is certainly more complex than the associated
activeX operations to implement for all objects but I can't
see that entget/entmake should be derogated to replace ncopy
if already implemented and canned. The ncopy method
does not preserve xdata from either xref objects or block
objects. It hardly preserves any properties, including layer
(probably for very good reasons). Neither does the
copyobjects method preserve it from the xref if used
on an attached xref. Though the explode method does
preserve the xdata from block sub-entities, it can only be
used on blocks.

The Xoffset price seems a bit high to me also given the
fact that ncopy is part of the freely available express tools,
but if John can get it, then more power to him.

Now both of you guys, chill and have a beer, then kiss and
make up. ;-)

Regards,
A. Fool


"Tony Tanzillo" <tony.t...@bogus.com> wrote in message news:4093a79e$1_1@newsprd01...


> "John Uhden" <juh...@cadlantic.com> wrote in message news:40930956$1_2@newsprd01...
>
> > It may be your opinion that one wants to preserve
> > all the data attached to the original object...
>
> Excuse me...
>

<snip>


Tony Tanzillo

unread,
May 1, 2004, 12:20:34 PM5/1/04
to
"A. Fool" <some...@angels.fear.to.tread> wrote in message news:4093bd3e$1_3@newsprd01...

> Tony,
> John has a point about the explode method. It won't work
> on xrefs. O'course I'd be happy for you to prove that the
> explode method can work on xrefs.

Doug - I know Explode doesn't work with XREFS. Exploding and
XREF binding are two different things.

This is about exploding some objects from a block in the
current document, not xref binding.

My comments weren't specifically targeting John's solution
but rather his general suggestion that the way to solve this
particular problem (NCOPY equivalent with blocks only) was
via (entmake).

Regarding the equating of entmake with deep-cloning methods
like CopyObjects, InsertBlock, Explode, etc., the problems
with entmake go far beyond lack of support for deep cloning
or translation of inter-object references.

Another major downside is that when AutoCAD entities get new
properties in new releases (for example, lineweights, true
color, and so on), the ENTMAKE-based "copy" code breaks, and
must be continuously revised to deal with those properties
(you can't simply pass the entget result list to entmake,
you have to manipulate it and insert things like (62 . 256)
when a color field is missing from the entget result list).
In contrast, when you use a deep-cloning method, there is
no need to revise anything, to cope with new properties on
entities.

To make matters worse, word has it that many custom objects
in the latest desktop products cannot even be created via
entmake, and that's the reason why it is depreciated, or at
least for the purpose of general processing of any kind of
entity.

PS: When I need to copy something from an XREF, I usually
access the xref database directly via ObjectDBX, which
works well for me.

michael puckett

unread,
May 1, 2004, 1:46:38 PM5/1/04
to
Tony, if I may, I respectfully submit that ...

Your programming expertise is rivaled by none and respected
by all, but the school yard bullying thing only serves to
diminish YOUR stature, not the recipient's, regardless that
your point(s) may be perfectly valid.

Also, while you can deftly steer a thread to the areas where
you sport an advantage or away from those points you do not
wish to address or acknowledge, valid points your opponents
make are not lost in the melee.

To be fair, I am aware that the tone you take with some
folks is the result of historical conflicts, and as a
result, we may not fully appreciate why there seems to be
disproportionate hostility or belittlement being directed at
what appears to be a seemingly innocent post.

Not that I have any empirical data to draw on.

Still, history or not, you have set the bar in so very many
different respects, why stop at coding eloquence?

For what it is worth I agree with the issues you flagged,
just not the manner in which you choose to deliver them.

It has been said that those things we tell other people are
frequently the very things we need to learn ourselves, so
this thread, and my post, are not lost on me.

Hoping you can accept this as constructive input.

Have a great weekend one and all; take in some nature.

Michael.

"Tony Tanzillo" <tony.t...@bogus.com> wrote in message news:4093a79e$1_1@newsprd01...


> "John Uhden" <juh...@cadlantic.com> wrote in message news:40930956$1_2@newsprd01...
>
> > It may be your opinion that one wants to preserve
> > all the data attached to the original object...
>
> Excuse me...
>
> Regardless of what you may have to say about my comments,

<<< snip >>>

Tony Tanzillo

unread,
May 1, 2004, 11:19:37 PM5/1/04
to
Marcel - Let me apologize for the 'infighting' that this
thread has spawned.

Let me also repeat the most imporant point of my original
reply, which is that your need to emulate the functionality
of NCOPY is very easy to do using the vla-Explode ActiveX
method.

If you're not sure how to go about it, just say so and
I'll be happy to post an example.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com

"Marcel Janmaat" <m.ja...@hiensch.nl> wrote in message news:4090c5f6_3@newsprd01...

Tony Tanzillo

unread,
May 1, 2004, 11:31:56 PM5/1/04
to
> Tony, if I may, I respectfully submit that ...
>
> Your programming expertise is rivaled by none....

Michael - When you start off like this, it only
serves to ensure that the remainder of the message
will not be read by me.

Have a nice day.

--

Best Regards,
Tony Tanzillo,
Design Automation Consulting
http://www.caddzone.com


michael puckett

unread,
May 2, 2004, 10:07:06 AM5/2/04
to
I have not failed. I just identified 10,000 ways that don't work.
- Thomas Edison

Have a good day all.

Sincerely,

Michael.

"Tony Tanzillo" <tony.t...@bogus.com> wrote in message news:40946ad3_1@newsprd01...

John Uhden

unread,
May 2, 2004, 11:12:57 AM5/2/04
to
I had a draft response almost as vile as yours, but had sense enough to discard
it. Rather I'd appreciate your demonstrating the explode technique.

BTW...
Yes you can entmake AECC_CONTOUR, AEC_CURVETEXT, AECC_POINT, and AECC_GRADE
objects.
In representing my price, you failed to mention it is for a site license
(unlimited users). Mom'n'Pop operations get heavy discounts, sometimes 100%.

--
John Uhden, Cadlantic
<the e-mail address is bogus>
http://www.cadlantic.com
Sea Girt, NJ

"Tony Tanzillo" <tony.t...@bogus.com> wrote in message

news:4093a79e$1_1@newsprd01...

Marcel Janmaat

unread,
May 3, 2004, 9:40:12 AM5/3/04
to
Thanx Tony! About the 'infighting', I don't care aslong as i get to what
i'm looking for. I even thought it was more or less amusing.
I think vla-Explode is what i need. But an example is always welcome.
Unfortunatly i cannot spend all of my time on programming. I'm gonna try it
later on.

MJ

"Tony Tanzillo" <tony.t...@bogus.com> schreef in bericht
news:40946ad2$1_1@newsprd01...

Marcel Janmaat

unread,
May 3, 2004, 10:20:55 AM5/3/04
to
I can't seem to find vla-explode.

MJ

"Tony Tanzillo" <tony.t...@bogus.com> schreef in bericht
news:40946ad2$1_1@newsprd01...

Tony Tanzillo

unread,
May 3, 2004, 10:23:15 AM5/3/04
to
This takes the entity name of the block insertion,
and returns a list of entity names of the primitives
created by exploding the block insert.

Use them, and erase them when done, or keep what you
want, and erase what you don't need. The original
block reference will not be erased.

;; No error checking!

(defun explode (ename)
(mapcar
'vlax-vla-object->ename
(vlax-safeArray->list
(vlax-variant-value
(vla-Explode (vlax-ename->vla-object ename))
)
)
)
)

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com


"Marcel Janmaat" <m.ja...@hiensch.nl> wrote in message news:40964c24$1_3@newsprd01...

Terry W. Dotson

unread,
May 3, 2004, 10:34:43 AM5/3/04
to
Tony Tanzillo wrote:

> Ask Terry Dotson how much fire he's drawn by proposing his
> product as the means of solving a coding problem someone has
> come here to ask for help with.

One of the big problems is trying to determine the ability and intent of
the people posting in this group.

Many are indeed capable of producing their own solution and simply need
a 'nudge'. These should be helped by the group members who can spare
the time to help, and many of those who are helped come back to help others.

Some are completely incapable or simply have no desire to create
anything of their own, they are looking for a *complete* free meal.
Some of these are brave enough to post over and over again. These
people should be left alone.

And lastly some peoples idea of customization is adding a prepackaged
ready to use component to their system. Some people who are fully
capable of creating their own routine value their time and realize its
sometimes better and cheaper to buy a ready to use component than to
spend dozens of hours creating their own. I frequently purchase end
user utilities I could write myself for this reason.

I don't think its a bad thing to make people aware of the purchasable
alternatives, as you do yourself on occasion. Would it truly be better
to leave people in the dark of their options and have them miss a
possible deadline while they struggle to create something thats already
complete and often time tested?

So the problem sometimes is distinguishing what type the poster is. In
this case "Marcel" said "within my own lisp", which narrowed it down to
the first case.

Terry

Marcel Janmaat

unread,
May 3, 2004, 10:59:41 AM5/3/04
to
I'm not looking for a prepackaged ready to use component. Just looking for
some help from more experienced programmers if i get stuck with programming.
Isn't this what this newsgroup is for? If i'm mistaken, please let me know?
I "think" i 'm resonably experienced myself, but unfortunatly mostly have
verry little time replying to programming questions of others. Does this
make me a bad newsgroup user?

MJ

"Terry W. Dotson" <nos...@invalid.com> schreef in bericht
news:40965926_2@newsprd01...

Terry W. Dotson

unread,
May 3, 2004, 11:11:32 AM5/3/04
to
Marcel Janmaat wrote:

> I'm not looking for a prepackaged ready to use component. Just
> looking for some help from more experienced programmers if i get
> stuck with programming. Isn't this what this newsgroup is for? If i'm
> mistaken, please let me know? I "think" i 'm resonably experienced
> myself, but unfortunatly mostly have verry little time replying to
> programming questions of others. Does this make me a bad newsgroup
> user?

Did you read this part of my post ...

"In this case "Marcel" said "within my own lisp", which narrowed it down
to the first case."

... and I defined the first case as ...

"Many are indeed capable of producing their own solution and simply need
a 'nudge'"

Terry

Doug Broad

unread,
May 3, 2004, 12:50:00 PM5/3/04
to
Marcel,
What version of AutoCAD do you have?
Did Tony's function work for you?
If not, did you use (vl-load-com) before his routine?

You won't find vla-anything in the help files. Instead
type explode in the vlide help search and you will
find how to use the explode method. There is
a translation process for activeX.

Post what you have tried and we can help you from
there. The more often you check the newsgroup for
replies, the faster you can be helped.

Regards,
Doug


"Marcel Janmaat" <m.ja...@hiensch.nl> wrote in message news:409655af$1_2@newsprd01...

Tony Tanzillo

unread,
May 3, 2004, 6:49:48 PM5/3/04
to
"Marcel Janmaat" <m.ja...@hiensch.nl> wrote

> I can't seem to find vla-explode.
>

Do you mean find it in the help? It's not in the
Visual LISP help. It's an ActiveX method, which
is only documented in VBA/ActiveX help. I realize
that's not much help for Visual LISPers, but that's
what Autodesk has seen fit to offer.

The example I posted attempts to distance the caller
from the ActiveX side of things by converting between
entity names and ActiveX objects.

John Uhden

unread,
May 3, 2004, 10:27:25 PM5/3/04
to
No, no, Marcel. Your question was perfectly fine. Unfortunately, my mention of
(entmake) aroused some ire which took the thread off into a stupid argument. My
apologies to you.

We should get back on track to see what would help you best.

--
John Uhden, Cadlantic
<the e-mail address is bogus>
http://www.cadlantic.com
Sea Girt, NJ

"Marcel Janmaat" <m.ja...@hiensch.nl> wrote in message

news:40965ec5$1_2@newsprd01...

Marcel Janmaat

unread,
May 4, 2004, 2:26:59 AM5/4/04
to
Sorry i'd mistaken your words. Never the less I was wondering if there a
sort of code on how to behave in a newsgroupe.
Is it rude to just gather information of others end not give input myself?
Do you guys get paid for this by AutoDesk? Do i have to see this strictly as
a service of Autodesk wich i can adress to?

MJ

"Terry W. Dotson" <nos...@invalid.com> schreef in bericht

news:409661c7_3@newsprd01...

Tony Tanzillo

unread,
May 4, 2004, 5:31:04 AM5/4/04
to
"Marcel Janmaat" <m.ja...@hiensch.nl> wrote

> Never the less I was wondering if there a
> sort of code on how to behave in a newsgroupe.

Yes, as a matter of fact there is not one, but
two sets of rules.

One for me, and one for everyone else.

In general, personal attacks are not allowed, unless
they are made against yours truly (to wit, see the
two personal attacks on me in this very thread).

Also, certain words or manner of speech are permitted
to be used by most, but not by myself.

You might think I'm kidding you, but for years I've
been meticulously documenting it.

Marcel Janmaat

unread,
May 4, 2004, 7:22:01 AM5/4/04
to

Sometime my vocabulary leaves me in the dark...

meticulously means?

Cant find it in my English to Dutch online dictionary.


"Tony Tanzillo" <tony.t...@bogus.com> schreef in bericht

news:409761fd$1_1@newsprd01...

Anne Brown

unread,
May 4, 2004, 8:48:31 AM5/4/04
to
Would you like the entire discussion removed? I read this as a
heated discussion not a personal attack on anyone but to sustain
your meticulous records, we could remove it all rather than pick
and chose.

Just reply with your wishes.
--
Anne Brown
Discussion Groups Administrator
Autodesk, Inc.

Mark Propst

unread,
May 4, 2004, 8:57:37 AM5/4/04
to
now THAT was a meticulous definition!
:-)

"Tony Tanzillo" <tony.t...@bogus.com> wrote in message

news:409788de_2@newsprd01...
me·tic·u·lous ( P ) Pronunciation Key (m-tky-ls)
adj.
<snip>


michael puckett

unread,
May 4, 2004, 9:15:45 AM5/4/04
to
Tony, if you considered my post an attack I am
completely surprised, and I am sorry. I did not
mean for it to read that way.

I responded because I could not, in good conscience,
let John twist in the wind by himself. Having been
the target of newsgroup bullying in the past, I
simply cannot let my silence suggest bullying or
personal attacks are acceptable.

Given what you just posted I know you understand.

Sincerely,

Michael.

"Tony Tanzillo" <tony.t...@bogus.com> wrote in message news:409761fd$1_1@newsprd01...

Doug Broad

unread,
May 4, 2004, 9:24:15 AM5/4/04
to

"Tony Tanzillo" <tony.t...@bogus.com> wrote in message news:409788de_2@newsprd01...


[From Latin metculsus, timid, from metus, fear.]
from http://www.dictionary.com

The latin roots don't really apply though do they? ;-)

Marcel,
Should we assume you desire no more "help" with your actual
problem?

Marcel Janmaat

unread,
May 4, 2004, 9:48:49 AM5/4/04
to
I more or less lost track. I read somthing about xoffset. I think thats
somthing i can use.
So on my behave, lets call it the end of this discussion? It was a
discussion, was it?

MJ

"Doug Broad" <dbr...@earthlink.net> schreef in bericht
news:40979986_1@newsprd01...

Tony Tanzillo

unread,
May 4, 2004, 10:06:35 AM5/4/04
to
"Anne Brown" <discussio...@autodesk.com> wrote

> Would you like the entire discussion removed? I read this as a

> heated discussion not a personal attack on anyone....

Are you're serious?

Don't bother removing anything, I'm not nearly as
thin skinned as some hypersensitive participants
in this thread.

Tony Tanzillo

unread,
May 4, 2004, 10:12:51 AM5/4/04
to
Has your problem (with coding) been solved? If not, then
feel free to ask for as much help as you want. The other
question regarding 'give and take' is not an issue. There's
no expectations regarding that. Ask as many questions or
post as many requests as you want. There's plenty of folks
here that are more than anxious and happy to help.

If you think John's end-user solution would suit your
needs, then by all means, go for it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com


"Marcel Janmaat" <m.ja...@hiensch.nl> wrote in message news:40979fab_3@newsprd01...

John Uhden

unread,
May 4, 2004, 10:40:53 PM5/4/04
to
Thanks, Michael, but it's hopeless as usual. I really feel bad for Marcel. The
poor fellow ended up getting caught in a crossfire.

--
John Uhden, Cadlantic
<the e-mail address is bogus>
http://www.cadlantic.com
Sea Girt, NJ

"michael puckett" <s...@m.not> wrote in message news:40979782$1_3@newsprd01...

0 new messages