FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro-Support
Wissen
Community
Über Uns
Referenzen
Jobs
Allgemeiner Kontakt
Händlerverzeichnis
FlexPro-Support
DE
EN
FR
Placeholder
Produkte und Lösungen
Support und Downloads
Unternehmen
Magazin
Kontakt
Sprache
MyWeisang

Account Einstellungen

Topic

Select all objects of same fpObjectType in ActiveFolder?

Startseite ' Community ' Automation and VBA ' Select all objects of same fpObjectType in ActiveFolder?

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Autor
    Beiträge
  • #35134
    Olivier Baillard
    Teilnehmer

    Hi,

    I m developping a custom Add-in for FlexPro in C#. I started from the example in the User folder and try myself to reproduce in C# the same behavior as in VBA (which is a lot of pain, because there is no documentation on the FlexPro assembly…)

    Actually, I am able to generate folder, formula, dataset and signal. I may selected one folder (like select with a mouse-click) and get of the listed object above.

    But I a have no clue how:
    – to select (like with a mouse-click) a particular object, which is not a folder (also formula, dataset, signal) anywhere in the folder structure
    – to select all objects of the same fpObjectType in the ActiveFolder (or in the Object List Window) and then enumerate them
    – to move any object from one folder to another folder

    [b]Any other example or documentation which is not delivered with FlexPro professionnal will be really great!!!![/b]

    Thanks in advance!

    #35136
    Olivier Baillard
    Teilnehmer

    Hi,

    I m developping a custom Add-in for FlexPro in C#. I started from the example in the User folder and try myself to reproduce in C# the same behavior as in VBA (which is a lot of pain, because there is no documentation on the FlexPro assembly…)

    Actually, I am able to generate folder, formula, dataset and signal. I may selected one folder (like select with a mouse-click) and get of the listed object above.

    But I a have no clue how:
    – to select (like with a mouse-click) a particular object, which is not a folder (also formula, dataset, signal) anywhere in the folder structure
    – to select all objects of the same fpObjectType in the ActiveFolder (or in the Object List Window) and then enumerate them
    – to move any object from one folder to another folder

    [b]Any other example or documentation which is not delivered with FlexPro professionnal will be really great!!!![/b]

    Thanks in advance!

    #35135
    Bernhard Kantz
    Teilnehmer

    The FlexPro Object Model is described in the Online Help in [i]Automating Processes > Automation Using FlexPro Visual Basic > FlexPro Visual Basic Reference[/i]. All objects, collections, properties and methods mentioned here can be found in the respective chapters.

    One remark in advance: It is seldom necessary to mark an object (as selected with the mouse) to perform some operations on it. Just get or set a property or apply a method on the object (or a collection of similiar objects) itself instead on a selection of object(s). Every object has a [i]Select[/i] method to mark it and a [i]MoveTo[/i] method to move it to another folder.

    To reference a certain object one may use the [i]Object()[/i] property of a folder. As an example: [i]ActiveDatabase.RootFolder(“Folder1Formula2”, fpObjectTypeFormula)[/i] addresses the formula with the (relative) path name in the databases root folder. (Remark: The example uses VBA syntax, some modifications for other languages may be required). If one wants to access multiple objects in a specific folder, a reference to that folder can be hold in a [i]Folder[/i] type variable and the objects can be addressed relative to that folder.

    A collection of objects can be obtained by the [i]Objects()[/i] property of a folder using either regular expressions, type specifying constants or a collection of [i]SearchConstraints[/i]. The resulting [i]FPObjects[/i] enumeration can be iterated over to get the items included.

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Das Thema „Select all objects of same fpObjectType in ActiveFolder?“ ist für neue Antworten geschlossen.