FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder
Products and Solutions
Support and Downloads
Company
Magazine
Contact Us
Language
MyWeisang

Account settings

Topic

Datenexport in Datei

Home page Community Automation and VBA Data export to file

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #34882
    Mustapha Ghazzouz
    Participant

    Gibt es (analog zum Importfilter) auch die Möglichkeit in Flexpro Objekte auch in eigenen Formaten zu exportieren ?!!

    #34891
    Mustapha Ghazzouz
    Participant

    Gibt es (analog zum Importfilter) auch die Möglichkeit in Flexpro Objekte auch in eigenen Formaten zu exportieren ?!!

    #34883
    Bernhard Kantz
    Participant

    There is no export method which is equivalent to the ImportSpy-method. So it’s not possible to add a custom export filter into the FlexPro export dialog.

    But you can program an export filter with VBA. After that you can create and modify custom toolbars and menu bars to deliver with your Visual Basic application.

    Support@weisang.com

    #34884
    Mustapha Ghazzouz
    Participant

    Danke nochmals für die Antwort. Ich muss möglicherweise den Exportfilter in C++ (z.B in Form einer Dll) programmieren. Gibt´s da die möglichkeit die C++ Dll mit VBA einzubinden ?!!

    #34885
    Bernhard Kantz
    Participant

    It is possible to write an import filter in C++ (or any other languages that can use COM). This is called an add-in. There are already some customers who have done this.

    FlexPro add-ins are implemented in the very same way as a MS Office addin. The interfaces used when connecting to FlexPro are the same as in MS Office, so the same literature applies. Apart from the different object models there is only one difference: The add-in must be registered below the key
    [code]HKCUSoftwareWeisangFlexPro7.0Addins[/code]
    so that FlexPro will recognize and load it (it should appear then in the dialog box reachable by ToolsAddin-Manager).

    Please note: Developing an add-in in C++ requires a thorough understanding of COM and MS Office add-in development. We cannot offer any free support regarding add-in development in the bounds of our FlexPro support.

    Support
    support@weisang.com

    #34886
    Mustapha Ghazzouz
    Participant

    Sie haben geschrieben “It is possible to write an import filter in C++ “. Sie meinen bestimmt export filter ?

    Ich werde mir das noch ansehen, wie es mit dem Add-in geht, danke.

    Ich möchte noch gerne wissen, ob es die möglichkeit gibt, eine C++ Dll in VBA einzubinden. Das habe ich über das Menü Extras -> Vreweise versucht, ich bekomme die Fehlermeldung “Verweis auf angegebene Datei kann nciht hinzugefügt werden” !!

    #34887
    Bernhard Kantz
    Participant

    Anything you can do in VBA is also possible in an add-in.

    Using Tools/References in VBA you can only add references to type libraries or exectutable files containing a type library.

    Regarding C++ DLLs: Depending on the calling convention, it is possible to import functions (no classes) from C or C++ DLLs.
    For instance to import the GetLocaleInfo function from kernel32.dll you have to declare this (see the exampel Importfilter.FPD):
    [code]
    Private Declare Function GetLocaleInfo Lib “kernel32” Alias _
    “GetLocaleInfoA” (ByVal Locale As Long, ByVal LCType As _
    Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
    [/code]
    Please take a look at the VBA help for the [b]declare[/b] keyword for more information.

    Support
    support@weisang.com

    #34888
    Mustapha Ghazzouz
    Participant

    Ok, it works.. Thanks for the support

    #34889
    Mustapha Ghazzouz
    Participant

    In meiner export-Routine bin ich jetzt zum Punkt gekommen wo ich ein Datensatz-Objekt habe (über COM). Wie ich das verstehe soll ich das analog zur Import-routine implementieren, nur aber in der anderen Richtung. Ich denke, das soll auch über BinaryDataLink gehen.

    Beim Importieren wird ein BinaryDataLink erzeugt und mit deren Hilfe alle Eigenschaften importiert. Am Ende wird mit evaluate()-Methode das angegebene Datenverknüpfungsobjekt in einen Datensatz umgewandelt.

    Ich habe erwartet, dass es eine Methode analog zu evaluate() gäbe, die ein Datensatz in einem Datenverknüpfungsobjekt umwandelt. Die habe ich leider nicht gefunden!!

    Ich bin ein Bisschen verwirrt, wie ich da vorgehen soll?

    #34890
    Bernhard Kantz
    Participant

    To export data objects in a new custom format you have to read the values and meta information from the data set and write it out with your own code in the required way.

    There is no way to convert a dataset to a data link object, neither binary nor other. To convert it to a binary file would require an extensive description on how to do this as there are countless ways to write out a binary file especially when meta data (or data from further resources) has to be included.
    Regarding the other link object types in FlexPro: When not otherwise specified FlexPro can only read the corresponding file formats. For the ones that are also writable you could simply use the [b]Export[/b] method.

    Support
    support@weisang.com

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.