Anybody working with simple AutoCAD Surfaces in VBA?

Anybody working with simple AutoCAD Surfaces in VBA?

Anonymous
Not applicable
455 Views
4 Replies
Message 1 of 5

Anybody working with simple AutoCAD Surfaces in VBA?

Anonymous
Not applicable
Hello all.

I need to generate many 'boxes' by reading values from a database.

I started off by using the Acad3DSolid, but the dwgs are ending up just too
large 6+ megs, and my test is placing about 1600 boxes, and I'll eventually
need to place many more.

So I thought I would try creating the ai_box (3D surface), but there is no
method in VBA for creating this, so you have to create it manually using the
IAcadPolygonMesh object. But the problem with this is you need to pass it
54 coordinates just to create a simple box! This just seems complex, and
there must be a more efficient method?

So I'm just curious if anybody has been working with surfaces, and what
might be some efficient methods to work with them.

Any info creatly appreciated.
Warren Medernach
0 Likes
456 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Hi,

You have to work with the base entity (AcadPolygonMesh).

It is not that complex to write a MeshBox function that will create the
PolygonMesh with the 54 pts needed.

Luc Morrissette,
Flairbase inc.

"Warren Medernach" wrote in message
news:[email protected]...
> Hello all.
>
> I need to generate many 'boxes' by reading values from a database.
>
> I started off by using the Acad3DSolid, but the dwgs are ending up just
too
> large 6+ megs, and my test is placing about 1600 boxes, and I'll
eventually
> need to place many more.
>
> So I thought I would try creating the ai_box (3D surface), but there is no
> method in VBA for creating this, so you have to create it manually using
the
> IAcadPolygonMesh object. But the problem with this is you need to pass it
> 54 coordinates just to create a simple box! This just seems complex, and
> there must be a more efficient method?
>
> So I'm just curious if anybody has been working with surfaces, and what
> might be some efficient methods to work with them.
>
> Any info creatly appreciated.
> Warren Medernach
>
0 Likes
Message 3 of 5

Anonymous
Not applicable
Hello Luc.

Thanks for the info.
Can you give me a 'kick' in the right direction?
How do I determine which coordinate belongs where?
Where can I find more info on the AcadPolygonMesh?

Thanks
Warren Medernach

"Luc Morrissette" wrote in message
news:[email protected]...
> Hi,
>
> You have to work with the base entity (AcadPolygonMesh).
>
> It is not that complex to write a MeshBox function that will create the
> PolygonMesh with the 54 pts needed.
>
> Luc Morrissette,
> Flairbase inc.
>
> "Warren Medernach" wrote in message
> news:[email protected]...
> > Hello all.
> >
> > I need to generate many 'boxes' by reading values from a database.
> >
> > I started off by using the Acad3DSolid, but the dwgs are ending up just
> too
> > large 6+ megs, and my test is placing about 1600 boxes, and I'll
> eventually
> > need to place many more.
> >
> > So I thought I would try creating the ai_box (3D surface), but there is
no
> > method in VBA for creating this, so you have to create it manually using
> the
> > IAcadPolygonMesh object. But the problem with this is you need to pass
it
> > 54 coordinates just to create a simple box! This just seems complex,
and
> > there must be a more efficient method?
> >
> > So I'm just curious if anybody has been working with surfaces, and what
> > might be some efficient methods to work with them.
> >
> > Any info creatly appreciated.
> > Warren Medernach
> >
>
0 Likes
Message 4 of 5

Anonymous
Not applicable
Hi,

Draw a box with Autocad 2000, bring the properties box, and use the vertex
property to navigate trough the vertex. This will show you what is the
sequence needed. This vertex list is the array you have to pass to the
coordinates property of the AcadPolygonMesh. Dont forget to set M and N
vertex count as well.

Bye,

Luc Morrissette,
Flairbase inc.

"Warren Medernach" wrote in message
news:[email protected]...
> Hello Luc.
>
> Thanks for the info.
> Can you give me a 'kick' in the right direction?
> How do I determine which coordinate belongs where?
> Where can I find more info on the AcadPolygonMesh?
>
> Thanks
> Warren Medernach
>
> "Luc Morrissette" wrote in message
> news:[email protected]...
> > Hi,
> >
> > You have to work with the base entity (AcadPolygonMesh).
> >
> > It is not that complex to write a MeshBox function that will create the
> > PolygonMesh with the 54 pts needed.
> >
> > Luc Morrissette,
> > Flairbase inc.
> >
> > "Warren Medernach" wrote in message
> > news:[email protected]...
> > > Hello all.
> > >
> > > I need to generate many 'boxes' by reading values from a database.
> > >
> > > I started off by using the Acad3DSolid, but the dwgs are ending up
just
> > too
> > > large 6+ megs, and my test is placing about 1600 boxes, and I'll
> > eventually
> > > need to place many more.
> > >
> > > So I thought I would try creating the ai_box (3D surface), but there
is
> no
> > > method in VBA for creating this, so you have to create it manually
using
> > the
> > > IAcadPolygonMesh object. But the problem with this is you need to
pass
> it
> > > 54 coordinates just to create a simple box! This just seems complex,
> and
> > > there must be a more efficient method?
> > >
> > > So I'm just curious if anybody has been working with surfaces, and
what
> > > might be some efficient methods to work with them.
> > >
> > > Any info creatly appreciated.
> > > Warren Medernach
> > >
> >
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
Duh! Such a simple answer, I looked right by it 😉

Thanks Luc.

Warren Medernach

"Luc Morrissette" wrote in message
news:[email protected]...
> Hi,
>
> Draw a box with Autocad 2000, bring the properties box, and use the vertex
> property to navigate trough the vertex. This will show you what is the
> sequence needed. This vertex list is the array you have to pass to the
> coordinates property of the AcadPolygonMesh. Dont forget to set M and N
> vertex count as well.
>
> Bye,
>
> Luc Morrissette,
> Flairbase inc.
>
> "Warren Medernach" wrote in message
> news:[email protected]...
> > Hello Luc.
> >
> > Thanks for the info.
> > Can you give me a 'kick' in the right direction?
> > How do I determine which coordinate belongs where?
> > Where can I find more info on the AcadPolygonMesh?
> >
> > Thanks
> > Warren Medernach
> >
> > "Luc Morrissette" wrote in message
> > news:[email protected]...
> > > Hi,
> > >
> > > You have to work with the base entity (AcadPolygonMesh).
> > >
> > > It is not that complex to write a MeshBox function that will create
the
> > > PolygonMesh with the 54 pts needed.
> > >
> > > Luc Morrissette,
> > > Flairbase inc.
> > >
> > > "Warren Medernach" wrote in message
> > > news:[email protected]...
> > > > Hello all.
> > > >
> > > > I need to generate many 'boxes' by reading values from a database.
> > > >
> > > > I started off by using the Acad3DSolid, but the dwgs are ending up
> just
> > > too
> > > > large 6+ megs, and my test is placing about 1600 boxes, and I'll
> > > eventually
> > > > need to place many more.
> > > >
> > > > So I thought I would try creating the ai_box (3D surface), but there
> is
> > no
> > > > method in VBA for creating this, so you have to create it manually
> using
> > > the
> > > > IAcadPolygonMesh object. But the problem with this is you need to
> pass
> > it
> > > > 54 coordinates just to create a simple box! This just seems
complex,
> > and
> > > > there must be a more efficient method?
> > > >
> > > > So I'm just curious if anybody has been working with surfaces, and
> what
> > > > might be some efficient methods to work with them.
> > > >
> > > > Any info creatly appreciated.
> > > > Warren Medernach
> > > >
> > >
> >
>
0 Likes