VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

explode a dimension

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
359 Views, 8 Replies

explode a dimension

Is there a way to explode a dimension without having to use SENDCOMMAND?
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

You should be able to do it with the Explode method
applied to the Block Reference.



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Is
there a way to explode a dimension without having to use
SENDCOMMAND?
Message 3 of 9
joesu
in reply to: Anonymous

David,

What block reference would that be? There is a block object associated a dimension object [which cannot be exploded] but no block reference object that I'm aware of.

Joe
--
Message 4 of 9
Anonymous
in reply to: Anonymous

Thats the impression that I was under...... I can't find any mechanism that will let me explode a dimension
Message 5 of 9
joesu
in reply to: Anonymous

I believe that SendCommand is your only opinion, though not a good one.

Joe
--
Message 6 of 9
Anonymous
in reply to: Anonymous

Joe,

It shows up in my 2000i VBA object browser as
AcadBlockReference.  I don't have ADT or AutoCAD 2002 at this office, so I
made a brash assumption that it was still there.  There is also an example
of how to use the explode method to explode a polyline, or by reference from
said example a block, etc.  Please, correct me if I'm wrong, I haven't
worked with VBA enough to resemble an expert.



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
David,

What block reference would that be? There is a block object associated a
dimension object [which cannot be exploded] but no block reference object that
I'm aware of.

Joe
--

Message 7 of 9
joesu
in reply to: Anonymous

David,

A dimension object is not a block reference. It does have a block object counterpart but not a block reference. And because neither the a dimension object nor a block object can be exploded using VBA, I don't see anyway around the situation.

Not sure what you are referring to however when you say "It".

Joe
--
Message 8 of 9
Ed.Jobe
in reply to: Anonymous

Theoretically speaking, Joe, couldn't you find out what *D## block is associated with the dim, and then copy its subentities to the location of the dim? I imagine that's all the vba Explode method does. I was looking into it and the name of the block is not exposed by vba, so it would probably entail a mixture of lisp. But if you're going to go that route, you might as well just issue the EXPLODE command from lisp. -Ed

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 9 of 9
Anonymous
in reply to: Anonymous

Check out Randall's site [http://www.vbdesign.net/]...he already has the
code to do exactly that -> grab the blockref associated to the
dimension. From memory, the handle of the blockref is 2 greater than the
handle number of the dimension, with the exception of the first
dimension placed into the drawing. With the first instance, the handle
is only 1 greater. Randall had a whole example that parsed through it.

HTH,

Mike
===============================
Mike Tuersley
PhD @ CADalyst's AutoCAD Clinic
http://www.cadonline.com

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

Post to forums  

Autodesk Design & Make Report

”Boost