GitHub Projekte in Englisch

>>>GitHub Projekte in Englisch

Justin Walz hat sich die Arbeit gemacht und Scripte ins Englische übersetzt (Variablen & Kommentare). Vielen Dank!

GitHub – Repos

By |2018-03-08T08:53:25+00:002018-03-08|EPLAN, EPLAN-Scripts|

4 Comments

  1. Luc Morin 2018-03-08 at 17:10

    Johann,

    I was thinking of proposing to you that all your scripts should be modified to add the following conditional compile directive:

    /*
    The following compiler directive is necessary to enable editing scripts
    within Visual Studio.

    It requires that the „Conditional compilation symbol“ SCRIPTENV be defined
    in the Visual Studio project properties

    This is because EPLAN’s internal scripting engine already adds „using directives“
    when you load the script in EPLAN. Having them twice would cause errors.
    */

    #if SCRIPTENV
    using Eplan.EplApi.ApplicationFramework;
    using Eplan.EplApi.Scripting;
    using Eplan.EplApi.Base;
    using Eplan.EplApi.Gui;
    #endif

    /*
    On the other hand, some namespaces are not automatically added by EPLAN when
    you load a script. Those have to be outside of the previous conditional compiler directive
    */

    using System;
    using System.IO;
    using System.Windows.Forms;
    using System.Collections.Generic;
    using System.Linq;

     

    By using this method, it allows you to have „using“ directives that would otherwise make EPLAN throw an error when loading the scripts.

    What do you think?

  2. Luc Morin 2018-03-08 at 17:17

    I forgot to mention in my last comment that the compile directive depends on defining a „conditional compilation symbol“ in Visual Studio, like so:

  3. Luc Morin 2018-03-08 at 17:18

    Seems like I can’t post images in the comment section.

    Here is the imgur link: https://imgur.com/a/w1xe8

  4. Johann Weiher 2018-03-09 at 07:45

    Hey Luc, thanks for your suggestion. I know about that (descriped it in the book as well). But i think there is no problem at Runtime still 2.1 (or 2.3?).

    The only negative side effect without compiler attribut:
    If the Script has errors at compile time. The using directives are also listet.

    For me its a not necessary overhead.

    Or have you other reasons why that is recommend?

    Thanks for your suggestion!