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

display layer description

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
321 Views, 6 Replies

display layer description

I am trying to get the layer description in AutoCAD 2004 and I am having no
luck. Can someone help??

Here is what I have:

Dim ObjAcad As AcadApplication, oLayer As AcadLayer



Private Sub Command1_Click()
Set ObjAcad = GetObject(, "AutoCAD.Application")
For Each oLayer In ObjAcad.ActiveDocument.Layers

MsgBox oLayer.Name ' gets layer name
MsgBox oLayer."what do I put here" ' gets layer description

Next

End Sub
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

What layer description?


--
R. Robert Bell, MCSE
www.AcadX.com


"Nate Hunter" wrote in message
news:096CF8A19B7BFDD000066011D81B0ED1@in.WebX.maYIadrTaRb...
| I am trying to get the layer description in AutoCAD 2004 and I am having
no
| luck. Can someone help??
|
| Here is what I have:
|
| Dim ObjAcad As AcadApplication, oLayer As AcadLayer
|
|
|
| Private Sub Command1_Click()
| Set ObjAcad = GetObject(, "AutoCAD.Application")
| For Each oLayer In ObjAcad.ActiveDocument.Layers
|
| MsgBox oLayer.Name ' gets layer name
| MsgBox oLayer."what do I put here" ' gets layer description
|
| Next
|
| End Sub
|
|
Message 3 of 7
Anonymous
in reply to: Anonymous

In the ADT04 Layer manager there is a description field. I need to be able
to change the value in this field.

I am trying to get the layer description in AutoCAD 2004 and I am having
no luck. Can someone help??
Here is what I have:

Dim ObjAcad As AcadApplication, oLayer As AcadLayer

Private Sub Command1_Click()
Set ObjAcad = GetObject(, "AutoCAD.Application")
For Each oLayer In ObjAcad.ActiveDocument.Layers
MsgBox oLayer.Name ' gets layer name
MsgBox oLayer."what do I put here" ' gets layer description
Next
End Sub



"R. Robert Bell" wrote in message
news:1B92DB35E6EAB557F5CE25F424502F33@in.WebX.maYIadrTaRb...
> What layer description?
>
>
> --
> R. Robert Bell, MCSE
> www.AcadX.com
>
>
> "Nate Hunter" wrote in message
> news:096CF8A19B7BFDD000066011D81B0ED1@in.WebX.maYIadrTaRb...
> | I am trying to get the layer description in AutoCAD 2004 and I am having
> no
> | luck. Can someone help??
> |
> | Here is what I have:
> |
> | Dim ObjAcad As AcadApplication, oLayer As AcadLayer
> |
> |
> |
> | Private Sub Command1_Click()
> | Set ObjAcad = GetObject(, "AutoCAD.Application")
> | For Each oLayer In ObjAcad.ActiveDocument.Layers
> |
> | MsgBox oLayer.Name ' gets layer name
> | MsgBox oLayer."what do I put here" ' gets layer description
> |
> | Next
> |
> | End Sub
> |
> |
>
>
Message 4 of 7
Anonymous
in reply to: Anonymous

Basic AutoCAD has no layer descriptions. If this is in regards to an ADT
file opened in plain AutoCAD, you probably need to add a reference to
one of the ADT libraries. If this is intended to work with non-ADT
stations, you probably need to export the descriptions to an external
file and read that file in AutoCAD.
___________________________
Mike Tuersley
AutoCAD Clinic
Rand IMAGINiT Technologies
Message 4 of 7
Anonymous
in reply to: Anonymous

Sorry, no ADT here to help you with. Maybe on of the ADT guys here will jump
in.


--
R. Robert Bell, MCSE
www.AcadX.com


"Nate Hunter" wrote in message
news:674F9FE6D89616411058150B61DDA63A@in.WebX.maYIadrTaRb...
| In the ADT04 Layer manager there is a description field. I need to be
able
| to change the value in this field.
|
| I am trying to get the layer description in AutoCAD 2004 and I am having
| no luck. Can someone help??
| Here is what I have:
|
| Dim ObjAcad As AcadApplication, oLayer As AcadLayer
|
| Private Sub Command1_Click()
| Set ObjAcad = GetObject(, "AutoCAD.Application")
| For Each oLayer In ObjAcad.ActiveDocument.Layers
| MsgBox oLayer.Name ' gets layer name
| MsgBox oLayer."what do I put here" ' gets layer description
| Next
| End Sub
|
|
|
| "R. Robert Bell" wrote in message
| news:1B92DB35E6EAB557F5CE25F424502F33@in.WebX.maYIadrTaRb...
| > What layer description?
| >
| >
| > --
| > R. Robert Bell, MCSE
| > www.AcadX.com
| >
| >
| > "Nate Hunter" wrote in message
| > news:096CF8A19B7BFDD000066011D81B0ED1@in.WebX.maYIadrTaRb...
| > | I am trying to get the layer description in AutoCAD 2004 and I am
having
| > no
| > | luck. Can someone help??
| > |
| > | Here is what I have:
| > |
| > | Dim ObjAcad As AcadApplication, oLayer As AcadLayer
| > |
| > |
| > |
| > | Private Sub Command1_Click()
| > | Set ObjAcad = GetObject(, "AutoCAD.Application")
| > | For Each oLayer In ObjAcad.ActiveDocument.Layers
| > |
| > | MsgBox oLayer.Name ' gets layer name
| > | MsgBox oLayer."what do I put here" ' gets layer description
| > |
| > | Next
| > |
| > | End Sub
| > |
| > |
| >
| >
|
|
Message 4 of 7
Anonymous
in reply to: Anonymous

Nate -

There is a specific group for ADT Customization. Might want to
try there.

ADT Customization
http://discussion.autodesk.com/WebX?14@@.ee77eaa
news://discussion.autodesk.com/autodesk.aec.arch-desktop.customization
--
Anne Brown
Manager, Moderator
Autodesk Product Support Discussion Groups
Discussion Q&A: http://www.autodesk.com/discussion

Nate Hunter wrote:
>
> In the ADT04 Layer manager there is a description field. I need to be able
> to change the value in this field. (snip)
Message 7 of 7
Anonymous
in reply to: Anonymous

thanks I will try there

"Anne Brown" wrote in message
news:3F96BA67.A5E5C1EC@autodesk.com...
> Nate -
>
> There is a specific group for ADT Customization. Might want to
> try there.
>
> ADT Customization
> http://discussion.autodesk.com/WebX?14@@.ee77eaa
> news://discussion.autodesk.com/autodesk.aec.arch-desktop.customization
> --
> Anne Brown
> Manager, Moderator
> Autodesk Product Support Discussion Groups
> Discussion Q&A: http://www.autodesk.com/discussion
>
> Nate Hunter wrote:
> >
> > In the ADT04 Layer manager there is a description field. I need to be
able
> > to change the value in this field. (snip)

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

Post to forums  

Autodesk Design & Make Report

”Boost