.NET
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

First time trying .net

8 REPLIES 8
Reply
Message 1 of 9
wowens63
403 Views, 8 Replies

First time trying .net

i'm starting to learn not net for autocad, I wrote this DLL file with 2010 express the dll file lets the user go and select many files from many location i plan on using this DLL file in my autocad code plus window programs if you could please look at my basic attempt to write code and give me any suggestion to improve on this it would be great. there is a txt file showing how to use the dll file.

 

Thanks

8 REPLIES 8
Message 2 of 9
JamesMaeding
in reply to: wowens63

a few things:

  1.  make some kind of test command so we can test it.
  2.  For the debugging, many people are making a script you could call "loadSF.scr" and putting a netload statement with the path of the dll you create.  Then, in the debug part of your project settings, have it run acad exe as the prog, and put the script as a command line param so it runs the script on startup, thus loading your dll and everything is ready for you to type your test command.
  3.  consider writing in C# since the guys that know .net well for acad tend to be c++ programmers.
  4.  If you are doing your own file tree, consider looking at codeproject examples which know how to get the icons for the various things like drives, folders and files.  It gets them from the windows shell.

Search other posts for the script setup thing, we have suggested it over and over. thx


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 3 of 9
JamesMaeding
in reply to: wowens63

ok, I edited my reply, but the dumb web interface won't show it so not sure if it made it in.

that test command should be in your project decorated with command attribute.

You should make a class called program.vb and put the test command in it, be sure you have looked at the blog Through the Interface for its listing of help things.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 4 of 9
wowens63
in reply to: JamesMaeding

basically the dll i wrote will work in any vb.net dll or Exe program if the user references the dll file in there program. but I will try and figure out what you asked for. thanks for the information and I look forward to any more help you can give

Message 5 of 9
JamesMaeding
in reply to: wowens63

I see, but then post the test project and the dll.

A trick I do for my programs that run in autocad is to also make a main function that runs if you switch the application type to exe.

Several of my progs view and edit databases of info from acad.

So when the prog runs as an exe, the code detects and disable the acad dependent functions.

Depends what you are doing, but the best thing I ever did in .net was to set up test projects that allow development of one item at a time.  It lets you isolate the issue you are testing and hardcode values you would never do in a real prog.

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 6 of 9
wowens63
in reply to: JamesMaeding

here is a exe file that shows just the basic of what it will be used for.

Message 7 of 9
JamesMaeding
in reply to: wowens63

not bad, I did a select folder dialog of mu own a while back, looks like this:

getfolders.png


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 8 of 9
wowens63
in reply to: JamesMaeding

that looks good, question for you, how did you get the drive titles? i have not been able to figure it out.

Message 9 of 9
JamesMaeding
in reply to: wowens63

you need to look around a bit, there is a ton of free stuff on codeproject and other sites.

I think I used this project to get me going:

http://www.codeproject.com/KB/tree/ExplorerTreeView.aspx

this one too:

http://www.codeproject.com/KB/miscctrl/FileBrowser.aspx

 

 

 

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

ā€Boost