Options

C/Breeze (.NET API for object text file format)

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,495
edited 2015-04-02 in Download section
C/Breeze (.NET API for object text file format)
C/Breeze is a .NET API for interacting with object text files. C/Breeze allows developers to load an object text file from disk, query and/or manipulate its contents using an intuitive, high-level, type-safe interface, and (if required) write the resulting objects back to a disk file, ready to be imported into a NAV database.

Here's how C/Breeze could simplify your life as a (tool) developer:
- Development tool builders can work with objects and their properties, rather than deal with the quirks of the object text format.
- Make object modifications repeatable through scripting. Apply the same modifications to different base versions.
- Build .NET functions or Windows Powershell scripts to automate repetitive development tasks.
- While discussing designs and requirements, quickly generate a rough application prototype to verify all involved are "on the same page".

The current version of C/Breeze is designed to work with NAV 2013 objects.

In some Windows versions, you may need to unblock your downloaded .dll files before you can use them. In order to do so, open the Properties window for the file in question, and press the Unblock button in the lower right corner of the General tab.

For now, C/Breeze is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported license. If that doesn't work for you, let me know via cbreeze@uncommonsense.nl (or @uncommonsensenl on Twitter) and we'll figure something out.

http://www.mibuso.com/dlinfo.asp?FileID=1597

Discuss this download here.

Comments

  • Options
    mdPartnerNLmdPartnerNL Member Posts: 802
    Have an example to try it out with?
  • Options
    jhoekjhoek Member Posts: 216
    There are some very simple examples on http://uncommonsense.nl/cbreeze to get you started. I plan to publish more examples, but I'm also working on some other things that will make C/Breeze easier to use.

    If you have any specific questions about how to do something in C/Breeze, just post them here! :-)
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • Options
    ivankoleticivankoletic Member Posts: 27
    Great piece of code!!!

    However, I'm getting some strange error regarding date parsing. Guess you call DateTime.ParseExact, DateTimeFormatInfo is not good. So if I export object for e.g. Croatian version of NAV (2009 R2 in my case) I get

    System.FormatException was unhandled
    Message=String was not recognized as a valid DateTime.
    Source=mscorlib
    StackTrace:
    at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
    at System.DateTime.ParseExact(String s, String format, IFormatProvider provider)
    at UncommonSense.CBreeze.Read.DateTimeExtensionMethods.SetDateComponent(DateTime dateTime, String text)
    at UncommonSense.CBreeze.Read.ApplicationBuilder.OnObjectProperty(String propertyName, String propertyValue)
    at UncommonSense.Nav.Parser.Parser.ParseObjectProperty(Lines lines)
    at UncommonSense.Nav.Parser.Parser.ParseObjectPropertiesSection(Lines lines)
    at UncommonSense.Nav.Parser.Parser.ParseSection(Lines lines, ObjectType objectType)
    at UncommonSense.Nav.Parser.Parser.ParseObject(Lines lines)
    at UncommonSense.Nav.Parser.Parser.ParseApplication(Lines lines)
    at UncommonSense.Nav.Parser.Parser.Parse(IEnumerable`1 source)
    at UncommonSense.Nav.Parser.Parser.Parse(String fileName)

    Date time in Croatian version is formated like this:
    OBJECT Report 1 Chart of Accounts
    {
    OBJECT-PROPERTIES
    {
    Date=14.08.09;
    Time=12:00:00;
    Version List=NAVW16.00.01;
    }
    PROPERTIES
    {

    Guess you expect en-US date time format

    OBJECT Report 1 Chart of Accounts
    {
    OBJECT-PROPERTIES
    {
    Date=8/14/2009;
    Time=12:00:00;
    Version List=NAVW16.00.01;
    }
    PROPERTIES
    {

    Is there a chance you could add a CultureInfo property for Application object?

    Thanks
    Regards,
    Ivan Koletic
  • Options
    jhoekjhoek Member Posts: 216
    Hi!

    Thanks for your message, and thanks for trying C/Breeze!

    I have added the issue to my to do list, but lately I haven't been able to dedicate much time to C/Breeze, I'm afraid. If I were to make the source code entirely public - which I am considering (e.g. on GitHub) - would you perhaps be willing and able to contribute and deal with these internationalisation issues?

    Also, I don't know if this is still true, but I guess it is: in older NAV versions, when working in larger, international development teams, it was of utmost importance that everybody used the same regional settings (date/time formats, number formats). Otherwise, properties such as e.g. InitValue could easily misinterpret property values when importing objects in text format. Our team used the Danish settings (dd-mm-yy HH:mm:ss 9.999,99), but any standard will do. I guess I subconsciously assumed everybody was using these settings... ;-)
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • Options
    ivankoleticivankoletic Member Posts: 27
    Thanks for the quick reply. Re contributing, I can help for sure if source will be available.
    Regards,
    Ivan Koletic
  • Options
    jhoekjhoek Member Posts: 216
    Great! :-) I hope to be able to dedicate some time to C/Breeze, soon. If I do decide to open-source, you will read about it in the mibuso.com download!
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
This discussion has been closed.