Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23
  1. #21
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    33,156

    Default

    OK, I've done it! Attached is a VS2005 solution which consists of a wrapper .NET class library for the Plan Compiler, as well as a little C# test program that shows how to use it. You'll see how simple it isi to compile a plan and get back everything as objects, collections, etc. I was just amazed how easy it was to use the compiler WSC from VB.NET (that's what the wrapper class library DLL was written in).

    For starters, load up the AcpPlan solution and look around. Check out the tester application (command line). It's already set to just run in the VS IDE when you click the run button (I included a test plan and set the debugging options to have it on the command line and set the current directory). Note the sleazy trick I discovered for making the fake Util.Console! I am totally amazed it worked.

    To use this from any app in any .NET language:
    1. You must have the ACP Plan Compiler WSC installed. I hereby give you permission to distribute it with Planalyzer, no strings attached. Put it in ProgFiles\ACP ObsControl and right-click/register it. You can register it via an installer (Inno or MSI).
    2. Put the AcpPlan.dll file anywhere on your development system.
    3. Add a reference to AcpPlan.dll (references/browse) to your app
    4. Add using DC3.ACP; to the source file where you want to use the compiler
    5. Implement the fake Util.Console in your app. Look at how it's done in the Tester app.
    By looking at how the Tester app uses the Plan Compiler, you should be able to figure out most of the rest. NOTE: There are probably some bugs in the wrapper properties/methods; that's one of the reasons I sent you the whole solution/sources.

    Feel free to ask me questions by email. If you find bug(s) and correct them, I'd like to get the corrected sources bgack for future use.
    Attached Files Attached Files
    -- Bob

  2. #22
    Join Date
    Apr 2008
    Location
    Central Virginia, USA
    Posts
    745

    Default

    Quote Originally Posted by Bob Denny View Post
    OK, I've done it! Attached is a VS2005 solution which consists of a wrapper .NET class library for the Plan Compiler, as well as a little C# test program that shows how to use it
    I appreciate your effort Bob, but I use SharpDevelop instead of VS, and even though it says it compiles the VB code, when I run the app I get an error message that says something about the My Documents\Robert B. Denny\etc\etc\etc folder not existing. I can't find anything in the .prj or .sln file that specifies this directory.

    Please don't worry about it. Planalyzer seems to be working well by parsing the plan directly. True, Planalyzer ignores quite a few directives, but most of them don't significantly affect the run-time. I'm not sure Planalyzer needs everything in a plan to be packaged as objects.

    Again, thank you for trying to help. But given my non-VS development platform, I probably should stick with what I have.

    Mike

  3. #23
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    33,156

    Default

    Oh... I didn't know about your using SharpDevelop. If you change your mind about using the compiler, I can send you the AcpPlan.dll assembly - that's all you would need. I can maintain the VB code.

    I really don't like using VB.NET!! I used it for its COM late binding capabilities, which are supposed to be added to C# in the next version. ACP Scheduler is all C#.
    -- Bob

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My ACP program license cannot work
    By Yung Jung Chang in forum Customer and Pre-Sales Service (non-technical)
    Replies: 0
    Last Post: Sep 7, 2013, 10:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •