-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Variable search string for Objects.Names
- Dieses Thema hat 2 Antworten sowie 2 Teilnehmer und wurde zuletzt vor vor 12 Jahren, 2 Monaten von John Gerhardy aktualisiert.
-
AutorBeiträge
-
Oktober 22, 2012 um 4:13 pm Uhr #12788John GerhardyTeilnehmer
Hello,
I would like to have the search string for the Objects.Names property. Is it possible to use the indirect operator ($$) to accomplish this?
Example:
Dim TransscriptNames = \Messdaten\.Objects(“^P1.*\.fld$”).Namesgive me the names of the folders starting with “P1”, which I would like to be variable, so I tried this:
Dim SearchString = “^” : “P1” : “.*\\.fld$” //”^sig.*\.dat$”
Dim TransscriptNames = \Messdaten\.Objects($SearchString$).Namesbut this results in a “Variable not declared” error.
Syntax error or no can do?
Regards,
jgerhardyOktober 22, 2012 um 4:13 pm Uhr #8446John GerhardyTeilnehmerHello,
I would like to have the search string for the Objects.Names property. Is it possible to use the indirect operator ($$) to accomplish this?
Example:
Dim TransscriptNames = \Messdaten\.Objects(“^P1.*\.fld$”).Namesgive me the names of the folders starting with “P1”, which I would like to be variable, so I tried this:
Dim SearchString = “^” : “P1” : “.*\\.fld$” //”^sig.*\.dat$”
Dim TransscriptNames = \Messdaten\.Objects($SearchString$).Namesbut this results in a “Variable not declared” error.
Syntax error or no can do?
Regards,
jgerhardyOktober 26, 2012 um 1:54 pm Uhr #9253Bernhard KantzTeilnehmerThe 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 likeDim 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)
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.