Extracting identities from a dwg file?

Extracting identities from a dwg file?

Anonymous
Not applicable
277 Views
3 Replies
Message 1 of 4

Extracting identities from a dwg file?

Anonymous
Not applicable
I would like to know if it is possible to extract the identities of a dwg
with their properties through a vb application. I mean, if I draw in a dwg a
circle and a line, could I read the dwg from a visual basic application and
obtaining the radius of the circle for example?

My knowledges in programming autocad are low and before starting to learn
it, it would be useful for me to see if it is possible to make it

Thanks, regards,

Luisja
0 Likes
278 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor
You can do what you ask if you have Autocad installed on the machine where you are trying to run vb. VB alone can't interpret the dwg file format.

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

0 Likes
Message 3 of 4

Anonymous
Not applicable
Here is a very small snippet of code of showing all circle radii. No error
checking. Another way (probably better) is creating a selection set that
filters just circles. The following code just assumes that the drawing has
just circles.

Sub SeeAllCircleRadius()
Dim xCircle As AcadCircle
For Each xCircle In ThisDrawing.ModelSpace
MsgBox xCircle.Radius
Next
End Sub

Hope this helps and Good Luck!

Dreamcad
Gene Marchetto
973-728-3928
dreamcad@optonline.net



"Luisja" wrote in message
news:7F8B6CBFD387ADFC399EB663290F511C@in.WebX.maYIadrTaRb...
> I would like to know if it is possible to extract the identities of a dwg
> with their properties through a vb application. I mean, if I draw in a dwg
a
> circle and a line, could I read the dwg from a visual basic application
and
> obtaining the radius of the circle for example?
>
> My knowledges in programming autocad are low and before starting to learn
> it, it would be useful for me to see if it is possible to make it
>
> Thanks, regards,
>
> Luisja
>
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
Thanks Ed and Eugene:

now I'll start to read the documentation about VBA.

Greetings,

Luisja

"Eugene Marchetto" escribió en el mensaje
news:19862B2D45F74DEDE6081AEC70C1FBF0@in.WebX.maYIadrTaRb...
> Here is a very small snippet of code of showing all circle radii. No
error
> checking. Another way (probably better) is creating a selection set that
> filters just circles. The following code just assumes that the drawing
has
> just circles.
>
> Sub SeeAllCircleRadius()
> Dim xCircle As AcadCircle
> For Each xCircle In ThisDrawing.ModelSpace
> MsgBox xCircle.Radius
> Next
> End Sub
>
> Hope this helps and Good Luck!
>
> Dreamcad
> Gene Marchetto
> 973-728-3928
> dreamcad@optonline.net
>
>
>
> "Luisja" wrote in message
> news:7F8B6CBFD387ADFC399EB663290F511C@in.WebX.maYIadrTaRb...
> > I would like to know if it is possible to extract the identities of a
dwg
> > with their properties through a vb application. I mean, if I draw in a
dwg
> a
> > circle and a line, could I read the dwg from a visual basic application
> and
> > obtaining the radius of the circle for example?
> >
> > My knowledges in programming autocad are low and before starting to
learn
> > it, it would be useful for me to see if it is possible to make it
> >
> > Thanks, regards,
> >
> > Luisja
> >
> >
> >
>
>
0 Likes