| Author |
Message |
Laurie Comerford
Guest
|
Posted:
Fri Apr 08, 2005 5:27 am Post subject:
Exploding a hatch |
|
|
Hi,
If I use code to define and create a hatch, I can explode it by virtue of it
being the last object in the drawing by using a Sendcommand
"EXPLODE L "
However I would far prefer to explode it directly.
Can any one point me to how to explode a hatch with VBA?
--
Laurie Comerford
CADApps
www.cadapps.com.au
|
|
| Back to top |
|
 |
Tony Tanzillo
Guest
|
Posted:
Fri Apr 08, 2005 7:51 am Post subject:
Re: Exploding a hatch |
|
|
As far as I know, you can't explode a hatch with VBA.
If you use SendCommand, it would be more robust
to pass a LISP expression like
(command "._EXPLODE" (entlast))
(entlast) gives you the absoilute last entity regardless
of whether its visible or not.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message news:4255dcac_1@newsprd01...
| Quote: | Hi,
If I use code to define and create a hatch, I can explode it by virtue of it
being the last object in the drawing by using a Sendcommand
"EXPLODE L "
However I would far prefer to explode it directly.
Can any one point me to how to explode a hatch with VBA?
--
Laurie Comerford
CADApps
www.cadapps.com.au
|
|
|
| Back to top |
|
 |
Laurie Comerford
Guest
|
Posted:
Fri Apr 08, 2005 8:35 am Post subject:
Re: Exploding a hatch |
|
|
Hi Tony,
That was the sad conclusion I'd reached.
I'll take your advice about passing the lisp command.
It's still going to be easier to create the hatch, explode it and use the
resultant entities to find a regular series of locations inside a closed
polyline, than to do the "is point inside" type exercise.
--
Laurie Comerford
CADApps
www.cadapps.com.au
"Tony Tanzillo" <tony.tanzillo@U_KNOW_WHERE.com> wrote in message
news:425600a6$1_1@newsprd01...
| Quote: | As far as I know, you can't explode a hatch with VBA.
If you use SendCommand, it would be more robust
to pass a LISP expression like
(command "._EXPLODE" (entlast))
(entlast) gives you the absoilute last entity regardless
of whether its visible or not.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:4255dcac_1@newsprd01...
Hi,
If I use code to define and create a hatch, I can explode it by virtue
of it
being the last object in the drawing by using a Sendcommand
"EXPLODE L "
However I would far prefer to explode it directly.
Can any one point me to how to explode a hatch with VBA?
--
Laurie Comerford
CADApps
www.cadapps.com.au
|
|
|
| Back to top |
|
 |
Paul Richardson
Guest
|
Posted:
Fri Apr 08, 2005 4:41 pm Post subject:
Re: Exploding a hatch |
|
|
Laurie,
I posted some code a while back for someone
that needed to find the rotation angle of a hatch that
is attached to a rotated object. I iterated acad.Pat
for my data. Don't know what you need to do but
the idea might help.
gl
Paul
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:425608cb_3@newsprd01...
| Quote: | Hi Tony,
That was the sad conclusion I'd reached.
I'll take your advice about passing the lisp command.
It's still going to be easier to create the hatch, explode it and use the
resultant entities to find a regular series of locations inside a closed
polyline, than to do the "is point inside" type exercise.
--
Laurie Comerford
CADApps
www.cadapps.com.au
"Tony Tanzillo" <tony.tanzillo@U_KNOW_WHERE.com> wrote in message
news:425600a6$1_1@newsprd01...
As far as I know, you can't explode a hatch with VBA.
If you use SendCommand, it would be more robust
to pass a LISP expression like
(command "._EXPLODE" (entlast))
(entlast) gives you the absoilute last entity regardless
of whether its visible or not.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:4255dcac_1@newsprd01...
Hi,
If I use code to define and create a hatch, I can explode it by virtue
of it
being the last object in the drawing by using a Sendcommand
"EXPLODE L "
However I would far prefer to explode it directly.
Can any one point me to how to explode a hatch with VBA?
--
Laurie Comerford
CADApps
www.cadapps.com.au
|
|
|
| Back to top |
|
 |
Laurie Comerford
Guest
|
Posted:
Sat Apr 09, 2005 1:04 am Post subject:
Re: Exploding a hatch |
|
|
Hi Paul,
The functionality is used in CADApps Landscape program.
The user selects a closed polyline and the program draws tree blocks inside
the polyline. To avoid all the computations of block location and checking
that the location is inside the polyline, I hatch the area, explode the
hatch and then get the locations of the resultant lines to insert the trees.
A 'tree appearance' hatch is not viable for this for a variety of
reasons.inclusive of "planting" the blocks on a Land Desktop (or in due
course) a Civil 3D DTM and randomising the block appearance.
I looked at your code for reading the "Acad.pat" file and admire the work
you put into this. But for my case, the file data is irrelevant, as it is
the locations of the items in the hatch that I need.
--
Laurie Comerford
CADApps
www.cadapps.com.au
"Paul Richardson" <noSPAM@nospam.com> wrote in message
news:42567bff_3@newsprd01...
| Quote: | Laurie,
I posted some code a while back for someone
that needed to find the rotation angle of a hatch that
is attached to a rotated object. I iterated acad.Pat
for my data. Don't know what you need to do but
the idea might help.
gl
Paul
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:425608cb_3@newsprd01...
Hi Tony,
That was the sad conclusion I'd reached.
I'll take your advice about passing the lisp command.
It's still going to be easier to create the hatch, explode it and use
the
resultant entities to find a regular series of locations inside a closed
polyline, than to do the "is point inside" type exercise.
--
Laurie Comerford
CADApps
www.cadapps.com.au
"Tony Tanzillo" <tony.tanzillo@U_KNOW_WHERE.com> wrote in message
news:425600a6$1_1@newsprd01...
As far as I know, you can't explode a hatch with VBA.
If you use SendCommand, it would be more robust
to pass a LISP expression like
(command "._EXPLODE" (entlast))
(entlast) gives you the absoilute last entity regardless
of whether its visible or not.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:4255dcac_1@newsprd01...
Hi,
If I use code to define and create a hatch, I can explode it by
virtue
of it
being the last object in the drawing by using a Sendcommand
"EXPLODE L "
However I would far prefer to explode it directly.
Can any one point me to how to explode a hatch with VBA?
--
Laurie Comerford
CADApps
www.cadapps.com.au
|
|
|
| Back to top |
|
 |
Paul Richardson
Guest
|
Posted:
Sat Apr 09, 2005 1:44 am Post subject:
Re: Exploding a hatch |
|
|
I think if I had forgotten to add the rotation of
the first entity in the hatch when printing the
angle. Sorry it didn't help anyway.
Good luck with your project.
Paul
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:4256f080_3@newsprd01...
| Quote: | Hi Paul,
The functionality is used in CADApps Landscape program.
The user selects a closed polyline and the program draws tree blocks
inside
the polyline. To avoid all the computations of block location and
checking
that the location is inside the polyline, I hatch the area, explode the
hatch and then get the locations of the resultant lines to insert the
trees.
A 'tree appearance' hatch is not viable for this for a variety of
reasons.inclusive of "planting" the blocks on a Land Desktop (or in due
course) a Civil 3D DTM and randomising the block appearance.
I looked at your code for reading the "Acad.pat" file and admire the work
you put into this. But for my case, the file data is irrelevant, as it is
the locations of the items in the hatch that I need.
--
Laurie Comerford
CADApps
www.cadapps.com.au
"Paul Richardson" <noSPAM@nospam.com> wrote in message
news:42567bff_3@newsprd01...
Laurie,
I posted some code a while back for someone
that needed to find the rotation angle of a hatch that
is attached to a rotated object. I iterated acad.Pat
for my data. Don't know what you need to do but
the idea might help.
gl
Paul
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:425608cb_3@newsprd01...
Hi Tony,
That was the sad conclusion I'd reached.
I'll take your advice about passing the lisp command.
It's still going to be easier to create the hatch, explode it and use
the
resultant entities to find a regular series of locations inside a
closed
polyline, than to do the "is point inside" type exercise.
--
Laurie Comerford
CADApps
www.cadapps.com.au
"Tony Tanzillo" <tony.tanzillo@U_KNOW_WHERE.com> wrote in message
news:425600a6$1_1@newsprd01...
As far as I know, you can't explode a hatch with VBA.
If you use SendCommand, it would be more robust
to pass a LISP expression like
(command "._EXPLODE" (entlast))
(entlast) gives you the absoilute last entity regardless
of whether its visible or not.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:4255dcac_1@newsprd01...
Hi,
If I use code to define and create a hatch, I can explode it by
virtue
of it
being the last object in the drawing by using a Sendcommand
"EXPLODE L "
However I would far prefer to explode it directly.
Can any one point me to how to explode a hatch with VBA?
--
Laurie Comerford
CADApps
www.cadapps.com.au
|
|
|
| Back to top |
|
 |
|
|
|
|