FlexPro Forum – Discuss Your Topic!

Select all objects of same fpObjectType in ActiveFolder?

Home > Community > Automation and VBA > Select all objects of same fpObjectType in ActiveFolder?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12816

    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

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

    Thanks in advance!

    #8473

    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

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

    Thanks in advance!

    #9287
    Bernhard KantzBernhard Kantz
    Participant

    The FlexPro Object Model is described in the Online Help in Automating Processes > Automation Using FlexPro Visual Basic > FlexPro Visual Basic Reference. 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 Select method to mark it and a MoveTo method to move it to another folder.

    To reference a certain object one may use the Object() property of a folder. As an example: ActiveDatabase.RootFolder(“Folder1\Formula2”, fpObjectTypeFormula) 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 Folder type variable and the objects can be addressed relative to that folder.

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Select all objects of same fpObjectType in ActiveFolder?’ is closed to new replies.