.NET

.NET

Reply
*Corey A. Layton
Message 1 of 10 (231 Views)

VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

231 Views, 9 Replies
06-06-2006 06:12 AM
in VBA it's easy:
(using AEC Architectural Object Library (COM))

Dim AecDoc As New AecArchBaseDocument
AecDoc.Init ThisDrawing
Dim MyWallStyleName as String
MyWallStyleName = "Wall-A"
Dim MyStyleObject as AecObject
Set MyStyleObject = AecDoc.WallStyles.Item(MyWallStyleName)

but there's no 'Item' in VB.NET (that I can see...)

So, in VB.NET, I've tried:
(using AecArchMgd.dll)

Autodesk.Aec.Arch.DatabaseServices.DictionaryWallStyle.GetAt(MyWallStyleName)

thinking that this would work?
But I get an error list message:

'Reference to a non-shared member requires an object reference.'

what does this mean?
*Bobby C. Jones
Message 2 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 06:31 AM in reply to: *Corey A. Layton
Hey Corey,
The error message is telling you that the GetAt() method is an instance
method, not a shared method. You need an instance of a DictionaryWallStyle
object.
--
Bobby C. Jones


"Corey A. Layton" wrote in message
news:5196855@discussion.autodesk.com...
in VBA it's easy:
(using AEC Architectural Object Library (COM))

Dim AecDoc As New AecArchBaseDocument
AecDoc.Init ThisDrawing
Dim MyWallStyleName as String
MyWallStyleName = "Wall-A"
Dim MyStyleObject as AecObject
Set MyStyleObject = AecDoc.WallStyles.Item(MyWallStyleName)

but there's no 'Item' in VB.NET (that I can see...)

So, in VB.NET, I've tried:
(using AecArchMgd.dll)

Autodesk.Aec.Arch.DatabaseServices.DictionaryWallStyle.GetAt(MyWallStyleName)

thinking that this would work?
But I get an error list message:

'Reference to a non-shared member requires an object reference.'

what does this mean?
*Paul Richardson
Message 3 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 06:34 AM in reply to: *Corey A. Layton
You need an instance of your class before you can use it's
methods and fields that are not defined as 'Shared'

If you define your feilds as Share you do not need to instantiate
their class before using them, you can just call them directly with
out using the New keyword first.

"Corey A. Layton" wrote in message
news:5196855@discussion.autodesk.com...
in VBA it's easy:
(using AEC Architectural Object Library (COM))

Dim AecDoc As New AecArchBaseDocument
AecDoc.Init ThisDrawing
Dim MyWallStyleName as String
MyWallStyleName = "Wall-A"
Dim MyStyleObject as AecObject
Set MyStyleObject = AecDoc.WallStyles.Item(MyWallStyleName)

but there's no 'Item' in VB.NET (that I can see...)

So, in VB.NET, I've tried:
(using AecArchMgd.dll)

Autodesk.Aec.Arch.DatabaseServices.DictionaryWallStyle.GetAt(MyWallStyleName)

thinking that this would work?
But I get an error list message:

'Reference to a non-shared member requires an object reference.'

what does this mean?
*Corey A. Layton
Message 4 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 08:31 AM in reply to: *Corey A. Layton
Corey A. Layton wrote:
> what does this mean?

Bobby & Paul,

thanks for trying to help.

but I'm still lost.

Do either of you know of a resource that gives an example of accessing AEC
styles using AecArchMgd.dll? (complete code?)
*Paul Richardson
Message 5 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 10:30 AM in reply to: *Corey A. Layton
Have you tried the samples the came with
ADT?

"Corey A. Layton" wrote in message
news:5197118@discussion.autodesk.com...
Corey A. Layton wrote:
> what does this mean?

Bobby & Paul,

thanks for trying to help.

but I'm still lost.

Do either of you know of a resource that gives an example of accessing AEC
styles using AecArchMgd.dll? (complete code?)
*Bobby C. Jones
Message 6 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 10:34 AM in reply to: *Corey A. Layton
Corey,
Look in the sample folder under your ADT folder. Do you have the aecmgddbg
app that Jim awe created?
--
Bobby C. Jones



"Corey A. Layton" wrote in message
news:5197118@discussion.autodesk.com...
Corey A. Layton wrote:
> what does this mean?

Bobby & Paul,

thanks for trying to help.

but I'm still lost.

Do either of you know of a resource that gives an example of accessing AEC
styles using AecArchMgd.dll? (complete code?)
*Corey A. Layton
Message 7 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 10:45 AM in reply to: *Corey A. Layton
Bobby C. Jones wrote:
> Corey,
> Look in the sample folder under your ADT folder.
yeah, I'm in there now...

>Do you have the
> aecmgddbg app that Jim awe created?
no. what's that all about?
*Brian Winterscheidt
Message 8 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 11:37 AM in reply to: *Corey A. Layton
Corey A. Layton wrote:
> Bobby C. Jones wrote:
>
>>Corey,
>>Look in the sample folder under your ADT folder.
>
> yeah, I'm in there now...
>
>
>>Do you have the
>>aecmgddbg app that Jim awe created?
>
> no. what's that all about?

Corey,
The AecHardwiredStylesMgd sample (ADT2007) may be helpful...

--
Brian Winterscheidt
LWPB Architecture
Oklahoma City, Oklahoma
*Ed Jobe
Message 9 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 12:35 PM in reply to: *Corey A. Layton
Jim posted some useful samples. Search the ng for threads authored by Jim.

--
----
Ed
----
*Bobby C. Jones
Message 10 of 10 (231 Views)

Re: VB.NET - ADT: Accessing a style object (AecObject) by style name (String)?

06-06-2006 12:45 PM in reply to: *Corey A. Layton
See "MgdDbg & MgdDbgAec" in CF.
--
Bobby C. Jones

"Corey A. Layton" wrote in message
news:5197390@discussion.autodesk.com...
Bobby C. Jones wrote:
> Corey,
> Look in the sample folder under your ADT folder.
yeah, I'm in there now...

>Do you have the
> aecmgddbg app that Jim awe created?
no. what's that all about?
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.