.NET

Reply
Distinguished Contributor
terencechatfielduk
Posts: 943
Registered: ‎11-27-2003
Message 1 of 7 (73 Views)

VB 2005 Express

73 Views, 6 Replies
11-09-2005 01:17 PM
Has anyone tried to use .Net in Vb 2005 Express? I've downloaded and installed it, and trying the "Hello World" tutorial available from Autodesk http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627 and I can't even get the references to come up in the Object Browser?

I'm probably missing something basic, can anyone help? I haven't had this problem when I doing .com stuff with VBA/VB6
*David Kurtz
Message 2 of 7 (73 Views)

Re: VB 2005 Express

11-09-2005 01:55 PM in reply to: terencechatfielduk
terencechatfielduk wrote:
> Has anyone tried to use .Net in Vb 2005 Express? I've downloaded and installed it, and trying the "Hello World" tutorial available from Autodesk http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627 and I can't even get the references to come up in the Object Browser?
>
> I'm probably missing something basic, can anyone help? I haven't had this problem when I doing .com stuff with VBA/VB6

Yes it's confusing at first when you are used to VBA and COM. COM holds
your hand a lot (which was the point of course). You must manually add
the dll's to the reference which, is covered in in Step three of lab1
(use the browse tab).

Below are the acad/adt "managed" wrappers for dotnet that I know about
to reference to Reference; thus then show in the object browser. All are
in the main acad/ADT program files dir.

ACAD
acdbmgd.dll
acmgd.dll

ADT
AecArchMgd.dll
AecBaseMgd.dll
AecPropDataMgd.dll
AecStructureMgd.dll



--
David Kurtz
Peckham & Wright Architects, Inc.
Columbia, Missouri
*Jorge Jimenez
Message 3 of 7 (73 Views)

Re: VB 2005 Express

11-09-2005 01:59 PM in reply to: terencechatfielduk
Are you referencing acadx16enu.tlb ??

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica

wrote in message
news:5008780@discussion.autodesk.com...
Has anyone tried to use .Net in Vb 2005 Express? I've downloaded and
installed it, and trying the "Hello World" tutorial available from Autodesk
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627 and I
can't even get the references to come up in the Object Browser?

I'm probably missing something basic, can anyone help? I haven't had this
problem when I doing .com stuff with VBA/VB6
Distinguished Contributor
terencechatfielduk
Posts: 943
Registered: ‎11-27-2003
Message 4 of 7 (73 Views)

Re: VB 2005 Express

11-09-2005 03:13 PM in reply to: terencechatfielduk
David, I can do the loading, thats pretty straightforward and doesn't seem that different from VB6/VBA, but nothing comes up in the object browser box to even see. Attached is a screen capture from having loaded up the 6 .dll's you mentioned. Some seem to have loaded in here, some have not,including it seems the "AutoCAD .NET Managed Wrapper"

I assume it would be called Autocad.NET? I don't see anything listed as ObjectDBX.NET either, and in reply to the other suggestion the .tlb file doesn't exist I don't think for 2006.

In can't follow step 8 either, about starting off ADT within the "Start Action area".

Maybe I just can't do what I want on VB Express?
*David Kurtz
Message 5 of 7 (73 Views)

Re: VB 2005 Express

11-09-2005 05:09 PM in reply to: terencechatfielduk
terencechatfielduk wrote:
> David, I can do the loading, thats pretty straightforward and doesn't seem that different from VB6/VBA, but nothing comes up in the object browser box to even see.

If you expand each tree/namespace one more level that should get a view
of the definitions then highlight them to see like this. (see attached)
While ADT comes with help files of the managed types I needed to get the
object arx docs (arxref.chm) to get info on the plain acad stuff (though
is not formatted for VB so it's confusing...)

Still confused on how it all goes together... Though I seem to be able
to get though the first few labs ok.


>I don't see anything listed as ObjectDBX.NET either, and in reply to the other suggestion the .tlb file do
> esn't exist I don't think for 2006.

Beats me what that is right now. Ask again in a few months. :

> In can't follow step 8 either, about starting off ADT within the "Start Action area".

This stuff changed in the EE edition apparently so I never tried it. I
just launch acad/ADT manually and issue the NETLOAD command.
You and unNETLOAD though. So you have to kill adt, restart and reload
for each build.

> Maybe I just can't do what I want on VB Express?

Depends on what you want I guess. I'm no guru on it yet obviously and
don't know how to control things like you were trying yet...


--
David Kurtz
Peckham & Wright Architects, Inc.
Columbia, Missouri
Distinguished Contributor
ChrisArps
Posts: 311
Registered: ‎07-29-2004
Message 6 of 7 (73 Views)

Re: VB 2005 Express

11-10-2005 05:46 AM in reply to: terencechatfielduk
You have to "Add Reference" to your project.

Unlike COM there is no information in the registry, in VS2002/2003 you right click on the project name and choose "Add Reference".
By default the dotnet assembly tab should be up, you then browse to the acdbMgd.dll or any other dotnet dll and pick it.

Chris Arps
*Kenneth Hutson
Message 7 of 7 (73 Views)

Re: VB 2005 Express

11-22-2005 10:49 AM in reply to: terencechatfielduk
Here's what I get when I NETLOAD the resulting .dll:



Command: NETLOAD
Assembly file name: ~
Cannot load assembly. Error details: System.BadImageFormatException: The
format
of the file 'Lab1.dll' is invalid.
File name: "Lab1.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

=== Pre-bind state information ===
LOG: Where-ref bind. Location =
C:\1work\kjh\development\DOTNET\Lab1\bin\Lab1.dll
LOG: Appbase = C:\Program Files\Autodesk Building Systems 2006\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL
file:///C:/1work/kjh/development/DOTNET/Lab1/bin/Lab1.dll.



What's up with that?


>>Has anyone tried to use .Net in Vb 2005 Express? I've downloaded and
>>installed it, and trying the "Hello World" tutorial available from
>>Autodesk
>>http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627 and I
>>can't even get the references to come up in the Object Browser?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community