Author Topic: ChLayColt project ready to try, source included...  (Read 4910 times)

0 Members and 1 Guest are viewing this topic.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
ChLayColt project ready to try, source included...
« on: February 05, 2007, 06:42:39 PM »
I told everyone I would post this project when running well.
Thanks to several people, Glenn R, Kerry Brown, and others, its rolling!

Its a good example of a modeless dialog tool.  It also has various helper routines that show how to grab entity/layer props and change them.
Its set up for 2006 right now using VS2005, so to convert for 2007 use, simply change the reference paths and the debug startup settings to 2007.  I even have it set up so the exe params load the dll automatically with a script.

Try the tool on an entity from an xref, it lets you walk up and down the nesting levels, and change the layer props for that level along the way.

once unzipped, and you have netloaded the ChlayCoLtNetR16.dll file, the command is CCM.

Hope people enjoy the open source, we need more working sample apps like this that are medium complexity and beyond...
James Maeding

Glenn R

  • Guest
Re: ChLayColt project ready to try, source included...
« Reply #1 on: February 05, 2007, 06:48:58 PM »
Oh goody - something new to break, er, I mean play with!
I'll give it a flogging and let you know what I find.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: ChLayColt project ready to try, source included...
« Reply #2 on: February 05, 2007, 06:49:54 PM »
dang, forgot to include a couple files from my library folder, thie new zip has them...
James Maeding

Glenn R

  • Guest
Re: ChLayColt project ready to try, source included...
« Reply #3 on: February 05, 2007, 07:45:49 PM »
Arrrggghhh! It's VB...< runs away > :)

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: ChLayColt project ready to try, source included...
« Reply #4 on: February 05, 2007, 08:06:21 PM »
but, but.... most C# guys are pretty good at reading VB, its the VB guys that cant read c#.
no worries.  I actually bought a copy of InstantVB and its converts from c# really really good.
I can read both though, and like how c# does certain things for sure.

I attached some screen shots for anyone interested.
Only things I can't get going are the frozen in current viewport, and menemonics.
I want it to bring up the color dialog when I hit C.  The form is not reacting to my keydown event, I wonder if acad somehow has control.
James Maeding

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ChLayColt project ready to try, source included...
« Reply #5 on: February 05, 2007, 08:27:38 PM »
Arrrggghhh! It's VB...< runs away > :)

My eyes glaze over after 2 consecutive lines that start with Dim as well    :|
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: ChLayColt project ready to try, source included...
« Reply #6 on: February 05, 2007, 08:28:49 PM »
James,

No mnemonics show here in the project I downloaded so in the project, on your colour button properties, I changed it's 'Text' property to "&Color".
I then recompiled, loaded into Acad, rought up dialog and was able to colour dialog with the keystroke of ALT+C...which is how it's suppoed to work.

If you're not sure, you put the ampersand in from of the letter you want to be the shortcut.

Cheers,
Glenn.

Glenn R

  • Guest
Re: ChLayColt project ready to try, source included...
« Reply #7 on: February 05, 2007, 08:30:47 PM »
Damn, my speelling and grammar are terrible today!

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ChLayColt project ready to try, source included...
« Reply #8 on: February 05, 2007, 08:38:19 PM »
...  I even have it set up so the exe params load the dll automatically with a script.


From here ? http://www.theswamp.org/index.php?topic=14492.msg174606#msg174606

if so, good to see it was helpfull.

I think I'll have to find a VB to C# converter that has some smarts :-)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: ChLayColt project ready to try, source included...
« Reply #9 on: February 06, 2007, 12:46:52 PM »
Yes, I did get the script idea from your post Kerry, its the only way to go :)
I had added the mnemonics with the & like you said, with no luck.
I'm actually after different behavior, where you don't have to hit the alt, so I tried reacting to the keydown event:

Private Sub frmMain_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        Select Case e.KeyCode
            Case Keys.C
                cmdColor.PerformClick()
            Case Keys.A
                cmdApply.PerformClick()
            Case Keys.S
                cmdShallower.PerformClick()
            Case Keys.D
                cmdDeeper.PerformClick()
            Case Keys.R
                cmdRefresh.PerformClick()
        End Select
    End Sub

I set a breakpoint on this and it never stops, so the event is not happening...or something.
Glad to hear its going for you, that means its fixable. I'll try some more.

You might try InstantC# for those c# conversions, the authors seem to be really good at doing the conversions right.
thx
James Maeding