-
FlexPro
- Zoom sur FlexPro
- Fonctionnalités & Options
- Domaines d’application
- Tous les avantages
- Nouveau dans FlexPro 2021
- Testez FlexPro gratuitement
- FlexPro View OEM Freeware
- Conseils d’achat
- Login
- Langue
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produits
- News
- Support
- Société
- Emplois
- Contact
- Login
- Langue
- +49 6894 929600
- infoweisang.com
- Google Maps
Select all objects of same fpObjectType in ActiveFolder?
Accueil > Community > Automation and VBA > Select all objects of same fpObjectType in ActiveFolder?
- This topic has 2 replies, 2 voices, and was last updated 11 years, 7 months ago by Olivier Baillard.
-
AuthorPosts
-
May 8, 2013 at 11:09 pm #12816Olivier BaillardMember
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 folderAny other example or documentation which is not delivered with FlexPro professionnal will be really great!!!!
Thanks in advance!
May 8, 2013 at 11:09 pm #8473Olivier BaillardMemberHi,
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 folderAny other example or documentation which is not delivered with FlexPro professionnal will be really great!!!!
Thanks in advance!
May 10, 2013 at 8:54 am #9287Bernhard KantzParticipantThe 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.
-
AuthorPosts
- The topic ‘Select all objects of same fpObjectType in ActiveFolder?’ is closed to new replies.