07-09-2009 01:31 PM
hello.
i have a string (as a variable) an want to do 2 things:
i tried it with:
vari:="xxx_dd_02";
vari(7):="1";
but had no luck.
Any idea????
thx for any help
max
Solved! Go to Solution.
07-09-2009 02:39 PM
Hello Max!
There is no char access in VBS strings but you can work with strings parts like this
1.:
if Mid("abcKhhh",4,1) = "K" then MsgBox "It is a K!" else MsgBox "It isn't a K!" end if
2.:
dim s s = "xxx_dd_02" MsgBox Left(s,7) & "1" & Mid(s,9)
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
07-09-2009 11:09 PM
hi matthias,
thx a lot for help. the problem is, i need it in a diadem sequence (*.au) - no vb script :(. had a long search in the diadem help but no luck. maybe i will find some similar instruction for the diadem sequence.
thx a lot !
max
07-09-2009 11:57 PM
Hello Maexchen,
What version of DIAdem are you using? It is possible to mix AUT and VBS code (not recommended, but possible), so unless you are using a very old version of DIAdem, you might still be able to use the VBS code.
Best regards,
07-10-2009 12:19 AM
Hello Mäxchen!
AUT is a little bit different It's a time ago that I used it and I'm in a hurry now. Some small hints: Look at the commands cop and del (should be still in the help). I will make you an example in the evening (GMT).
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
07-10-2009 03:26 AM
Hello all,
thx for help, with the commands cop and del and the Stringaddition (+) all works fine. the help is a little bit strange because its hard to understand if a command is for vbs or aut-sequence.
it would be interesting how to mix "aut-code" and "VBS-code" in a aut-sequence. this could be sometime very nice :).
i am on Diadem 9.1.
Thx for all help
Max
07-10-2009 04:00 AM
Helo Max!
Nice that I could help.
To call VBS from AUT is easy! Have a look at the commands ScriptStatement and ScriptEvaluate or at this thread 'http://forums.ni.com/ni/board/message?board.id=60&message.id=3992&query.id=350780#M3992'
Have you tried the AUT->Script convert build in DIAdem? Give it a try. It produces 99.9% correct results (some verry unusual cases are not supported).
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
07-10-2009 05:14 AM
Hello Matthias,
will have a look to the other thread.
i can not convert the *.aut because it is a working test-stand where i had to implement a new test...