Importing/Exporting layer data from Auto CAD 2000 drawing database

Importing/Exporting layer data from Auto CAD 2000 drawing database

Anonymous
Not applicable
237 Views
1 Reply
Message 1 of 2

Importing/Exporting layer data from Auto CAD 2000 drawing database

Anonymous
Not applicable
I am trying to extract layer data (Layer Name, Color, Line Type) from
the drawing database for updating purpose and export them back to the
database. I don't know if this accessibility option exist b/c of integrity
issues.
What kind of database does Auto CAD 2000 utilize to store drawing
information's ?

If any one can help I really appreciate it.

Mike Worku
mworku@smoakdesigns.com
mickeytech@yahoo.com
0 Likes
238 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Michael,

AutoCAD is object based therefore doesn't have a database per say. Use the
code below to create a layer and change linetype info from the current
drawing. If you want to select layers, use the item method for the object.
Since VBA for AutoCAD is object based you must have an object to modify it.
Try setting a Layer to a variable bu make sure the variable is defined as
AcadLayer or you will get a Type Mismatch error.

'--- Update Layer1 to Hidden2 LineType.
Dim Layer1 As AcadLayer
Dim LType As AcadLineType
Dim TypeName As String

TypeName = "HIDDEN2"

'--- Load the LineType and set it Active.
On Error Resume Next
ThisDrawing.Linetypes.Load TypeName, "acad.lin"
ThisDrawing.ActiveLinetype = LType
On Error GoTo 0

'--- Add Layer and set LineType to "HIDDEN2".
Set Layer1 = ThisDrawing.Layers.Add("1")
ThisDrawing.ActiveLayer = Layer1
Layer1.Linetype = "HIDDEN2"

Hope this info helped a little.

Bryan

"michael worku" wrote in message
news:52948F2F3688E84BC3D514E504F46FF3@in.WebX.SaUCah8kaAW...
> I am trying to extract layer data (Layer Name, Color, Line Type) from
> the drawing database for updating purpose and export them back to the
> database. I don't know if this accessibility option exist b/c of integrity
> issues.
> What kind of database does Auto CAD 2000 utilize to store drawing
> information's ?
>
> If any one can help I really appreciate it.
>
> Mike Worku
> mworku@smoakdesigns.com
> mickeytech@yahoo.com
>
0 Likes