Hi vermaccio

I assume you have a neutral file and you want to shift P1 and T1 to P2 and T2 leaving P1 and T1 blank

Copy and paste the following text in a text file and save the file with extension .vbs. Double click the file and enter the Cii filename (neutral file with P1 and T1) with full path and then it will create another neutral file in the same folder with same filename but with suffix "_modified". You can import this modified neutral file in Caesar. The P1 and T1 will be shifted as required
(I assume there is no other changes required in the neutral file because of this shift e.g allowable stress etc)

Source = InputBox("Select the Cii file")
Set FileSysObj = CreateObject("scripting.filesystemobject")
If Source <> "" And FileSysObj.getextensionname(Source) = "CII" Then
Set TxtStrS = FileSysObj.getfile(Source).openastextstream
Dest = FileSysObj.getbasename(Source)
Set TxtStrD = FileSysObj.createtextfile(FileSysObj.getparentfoldername(Source) & "" & Dest & "_modified.CII", True)
tmp = TxtStrS.readline
Do While Trim(tmp) <> "#$ ELEMENTS"
TxtStrD.writeline tmp
tmp = TxtStrS.readline
Loop
TxtStrD.writeline "#$ ELEMENTS"
tmp = TxtStrS.readline
Do
i = i + 1
ElemLineNo = i Mod 15
If ElemLineNo = 2 Then
TxtStrD.write Mid(tmp, 1, 41)
TxtStrD.write " 0.000000"
TxtStrD.write Mid(tmp, 42, 13)
TxtStrD.writeline Mid(tmp, 68, 80)
ElseIf ElemLineNo = 4 Then
TxtStrD.write " 0.000000"
TxtStrD.write Mid(tmp, 16, 13)
TxtStrD.writeline Mid(tmp, 29, 80)
Else
TxtStrD.writeline tmp
End If
tmp = TxtStrS.readline
Loop While Left(tmp, 2) <> "#$"
TxtStrD.writeline tmp
Do While Not TxtStrS.atendofstream
TxtStrD.writeline TxtStrS.readline
Loop

TxtStrS.Close
TxtStrD.Close

Set TxtStrS = Nothing
Set TxtStrD = Nothing
Set FileSysObj = Nothing
MsgBox ("Done")
Else
MsgBox ("File Not Found")
End If

Regards,
Tanveer


Edited by Tanveer Mukhtar_dup1 (12/07/20 02:33 AM)