-
FlexPro
- At a Glance
- Features & Options
- Applications
- All Advantages
- What’s New in FlexPro 2021
- Try FlexPro For Free
- FlexPro View OEM Freeware
- Buying Guide
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Products
- News
- Support
- Company
- Contact
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Home > Community > FPScript > Variable search string for Objects.Names > Reply To: Variable search string for Objects.Names
October 26, 2012 at 1:54 pm
#9253
Bernhard Kantz
Participant
The Objects.Names property uses a string as select argument. This can be a constant string like “^P1.*\.FLD$” or a variable containing such a value.
If for example someone wants to specify the folder by a varying number, a code fragment like
Dim no = 1
Dim select = "^P" : String no : ".*\.FLD$"
dim folderNames = \Messdaten\.Objects(select).Names
lists all folders under the root folder Messdaten prefixed with ‘P’ and the number.
If one uses names like “P001”, “P002”, … to distinguish between the different objects, the following expression constructs these strings from a numeric value:
Dim no = 1
Dim objName = "P" : StringMid(String (no + 1000), 1)