FlexPro
HistoryBase
Ingénierie
Formation
Téléchargements
Assistance FlexPro
Connaissance
Communauté
À propos de nous
Références
Emplois
Contact général
Liste des revendeurs
Assistance FlexPro
FR
DE
EN
Porte-plaquette
Produits et solutions
Support et téléchargements
Entreprise
Magazine
Contact
Langue
MyWeisang

Paramètres du compte.

Topic

Select all objects of same fpObjectType in ActiveFolder?

Page d'accueil ' Communauté ' Automation et VBA ' Sélectionner tous les objets du même type fpObjectType dans ActiveFolder ?

Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Auteur
    Messages
  • #35134
    Olivier Baillard
    Participant

    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
    Participant

    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
    Participant

    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.

Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Le sujet ‘Select all objects of same fpObjectType in ActiveFolder?’ est fermé à de nouvelles réponses.