Parsing Code Macro Trouble!

Snaybot

New Member
Joined
Apr 28, 2015
Messages
40
I have raw code export:

Cross Post:

http://www.msofficeforums.com/excel-programming/31160-parsing-code-macro-trouble.html
http://www.excelforum.com/showthread.php?t=1139253&p=4386328&highlight=#post4386328


STEP NAME="S0"
{
DESCRIPTION="Abort Logic"
RECTANGLE= { X=205 Y=60 H=40 W=120 }
}
STEP NAME="S10"
{
DESCRIPTION="Abort State Setup"
RECTANGLE= { X=205 Y=196 H=40 W=120 }
ACTION NAME="A1"
{
DESCRIPTION="Set unit message to message 10"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'^/P_MSG_PATH.CV' := '^/P_MSG_10';
'^/P_MSG_TYPE.CV' := 'MSG_TYPE:Failure'"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A2"
{
DESCRIPTION="Set Failure Devices Mask to 0"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'^/FAIL_MONITOR/DEV_FAIL_MASK.CV' := 0;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A3"
{
DESCRIPTION="Disable Process Failure Conditions "
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'^/FAIL_MONITOR/CND1/DISABLE.CV' := 1;
'^/FAIL_MONITOR/CND2/DISABLE.CV' := 1;
'^/FAIL_MONITOR/CND3/DISABLE.CV' := 1;
'^/FAIL_MONITOR/CND4/DISABLE.CV' := 1;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A4"
{
DESCRIPTION="If PH-ARB composite is active then set PH-ARB composite to stop"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="IF '^/FAIL_MONITOR/PH-ARB/STATE.CV' = '$sfc_states:Sequence Active' THEN
ENDIF;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A5"
{
DESCRIPTION="Send Sync message 254 to Destination Unit"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#THIS-UNIT#/U_SYNC_MSG_WR.CV' := 'SYNC_MSG:Phase Aborted';"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A6"
{
DESCRIPTION="Clear unit message 2"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'^/P_MSG_PATH2.CV' := """";
'^/P_MSG_TYPE2.CV' := 'MSG_TYPE:Information'"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
}
STEP NAME="S20"
{
DESCRIPTION="Set EM Abort State"
RECTANGLE= { X=205 Y=332 H=40 W=120 }
ACTION NAME="A1"
{
DESCRIPTION="Set #EM_INLET# to HOLD"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="IF '//#EM_INLET#/OWNER_ID.CV' = '/THIS-UNIT' THEN
ENDIF;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A2"
{
DESCRIPTION="Set #EM_PRESS# to HOLD"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="IF '//#EM_PRESS#/OWNER_ID.CV' = '/THIS-UNIT' THEN
ENDIF;"
DELAY_TIME=0
CONFIRM_EXPRESSION="TRUE"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A3"
{
DESCRIPTION="Set #EM_OUTLET# to HOLD"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="IF '//#EM_OUTLET#/OWNER_ID.CV' = '/THIS-UNIT' THEN
ENDIF;"
DELAY_TIME=0
CONFIRM_EXPRESSION="TRUE"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A4"
{
DESCRIPTION="Set #CM_OUTLET# to Close"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_OUTLET#/CAS_SP.CV' := 'VLV_SP:CLOSE';"
DELAY_TIME=0
CONFIRM_EXPRESSION="TRUE"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A5"
{
DESCRIPTION="Set #CM_LPT_DRN_VLV# to Close"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_LPT_DRN_VLV#/CAS_SP.CV' := 'VLV_SP:CLOSE';"
DELAY_TIME=0
CONFIRM_EXPRESSION="TRUE"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A6"
{
DESCRIPTION="Set #EM_AGIT# to HOLD"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="IF '//#EM_AGIT#/OWNER_ID.CV' = '/THIS-UNIT'
THEN
ENDIF;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A7"
{
DESCRIPTION="Set #EM_TEMP# to HOLD"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="IF '//#EM_TEMP#/OWNER_ID.CV' = '/THIS-UNIT'
THEN
ENDIF;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
}
STEP NAME="S30"
{
DESCRIPTION="Disable Alarms"
RECTANGLE= { X=200 Y=468 H=40 W=130 }
ACTION NAME="A1"
{
DESCRIPTION="Disable # CM_PRESS#/LO_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_PRESS#/LO_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A2"
{
DESCRIPTION="Disable # CM_PRESS#/LO_LO_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_PRESS#/LO_LO_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A3"
{
DESCRIPTION="Disable # CM_PRESS#/HI_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_PRESS#/HI_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A4"
{
DESCRIPTION="Disable # CM_PRESS#/HI_HI_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_PRESS#/HI_HI_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A5"
{
DESCRIPTION="Disable #CM_VSL_TMP_CTRL#/LO_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_VSL_TMP_CTRL#/LO_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A6"
{
DESCRIPTION="Disable #CM_VSL_TMP_CTRL#/LO_LO_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_VSL_TMP_CTRL#/LO_LO_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A7"
{
DESCRIPTION="Disable #CM_VSL_TMP_CTRL#/HI_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_VSL_TMP_CTRL#/HI_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A8"
{
DESCRIPTION="Disable #CM_VSL_TMP_CTRL#/HI_HI_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_VSL_TMP_CTRL#/HI_HI_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A9"
{
DESCRIPTION="Disable #CM_JKT_TMP_CTRL#/LO_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_JKT_TMP_CTRL#/LO_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A10"
{
DESCRIPTION="Disable #CM_JKT_TMP_CTRL#/LO_LO_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_JKT_TMP_CTRL#/LO_LO_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A11"
{
DESCRIPTION="Disable #CM_JKT_TMP_CTRL#/HI_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_JKT_TMP_CTRL#/HI_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A12"
{
DESCRIPTION="Disable #CM_JKT_TMP_CTRL#/HI_HI_ALM"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'//#CM_JKT_TMP_CTRL#/HI_HI_ENB' := False;"
DELAY_TIME=0
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
}
STEP NAME="S40"
{
DESCRIPTION="Complete"
RECTANGLE= { X=205 Y=600 H=40 W=120 }
ACTION NAME="A1"
{
DESCRIPTION="Wait for PH-ARB composite = Idle. Set PH-ARB/ARB_CMD = Release. Set PH-ARB composite to Start"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'^/FAIL_MONITOR/PH-ARB/ARB_CMD.CV' := 'PH-ARB_CMD:Release';
'^/FAIL_MONITOR/PH-ARB/COMMAND.CV' := '$sfc_commands:Start Sequence';"
DELAY_EXPRESSION="'^/FAIL_MONITOR/PH-ARB/STATE.CV' = '$sfc_states:Sequence Idle'"
CONFIRM_EXPRESSION="'^/FAIL_MONITOR/PH-ARB/STATE.CV' = '$sfc_states:Sequence Completed'"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A2"
{
DESCRIPTION="Wait for [1]. Clear Unit Message"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'^/P_MSG_PATH.CV' := """";
'^/P_MSG_PATH2.CV' := """";
'^/P_MSG_TYPE.CV' := 'MSG_TYPE:Information';
'^/P_MSG_TYPE2.CV' := 'MSG_TYPE:Information';
'^/P_MSG_OWNER.CV' := """";
'^/P_MSG_OWNER2.CV' := """";"
DELAY_EXPRESSION="'S40/A1/STATE.CV' = '$sfc_action_states:Complete'"
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
ACTION NAME="A3"
{
DESCRIPTION="Wait for [2]. Clear Dynamic References"
ACTION_TYPE=ASSIGN
QUALIFIER=P
EXPRESSION="'^/P_MSG_PATH.$REF' := """";
'^/P_MSG_TYPE.$REF' := """";
'^/P_MSG_OWNER.$REF' := """";
'^/P_MSG_PATH2.$REF' := """";
'^/P_MSG_TYPE2.$REF' := """";
'^/P_MSG_OWNER2.$REF' := """";
'//#THIS-UNIT#/U_SYNC_RD.$REF' := """" ;
'//#THIS-UNIT#/U_SYNC_MSG_RD.$REF' := """" ;"
DELAY_EXPRESSION="'S40/A2/STATE.CV' = '$sfc_action_states:Complete'"
CONFIRM_EXPRESSION="True"
CONFIRM_TIME_OUT=0
}
}
INITIAL_STEP="S0"
TRANSITION NAME="T0"
{
DESCRIPTION="Pass Through"
POSITION= { X=255 Y=138 }
TERMINATION=F
EXPRESSION="True"
}
TRANSITION NAME="T10"
{
DESCRIPTION="Wait for actions to complete"
POSITION= { X=255 Y=274 }
TERMINATION=F
EXPRESSION="'S10/PENDING_CONFIRMS' = 0"
}
TRANSITION NAME="T20"
{
DESCRIPTION="Wait for actions to complete"
POSITION= { X=255 Y=410 }
TERMINATION=F
EXPRESSION="'S20/PENDING_CONFIRMS' = 0"
}
TRANSITION NAME="T30"
{
DESCRIPTION="Wait for actions to complete"
POSITION= { X=255 Y=546 }
TERMINATION=F
EXPRESSION="'S30/PENDING_CONFIRMS' = 0"
}
TRANSITION NAME="T40"
{
DESCRIPTION="Abort complete"
POSITION= { X=255 Y=682 }
TERMINATION=T
EXPRESSION="'S40/PENDING_CONFIRMS.CV' = 0"
}
STEP_TRANSITION_CONNECTION STEP="S0" TRANSITION="T0" { }
STEP_TRANSITION_CONNECTION STEP="S10" TRANSITION="T10" { }
STEP_TRANSITION_CONNECTION STEP="S20" TRANSITION="T20" { }
STEP_TRANSITION_CONNECTION STEP="S30" TRANSITION="T30" { }
STEP_TRANSITION_CONNECTION STEP="S40" TRANSITION="T40" { }
TRANSITION_STEP_CONNECTION TRANSITION="T0" STEP="S10" { }
TRANSITION_STEP_CONNECTION TRANSITION="T10" STEP="S20" { }
TRANSITION_STEP_CONNECTION TRANSITION="T20" STEP="S30" { }
TRANSITION_STEP_CONNECTION TRANSITION="T30" STEP="S40" { }
}

<tbody>
</tbody>

And I want to parse it in to a table like this

Its not finished but you get the picture

StepActionDescription
S0

<tbody>
</tbody>
N/A

<tbody>
</tbody>
N/A

<tbody>
</tbody>
T0

<tbody>
</tbody>
T0

<tbody>
</tbody>
Pass Through

<tbody>
</tbody>
S10
A1

<tbody>
</tbody>
Set unit message to message 10

<tbody>
</tbody>
A2
Set Failure Devices Mask to 0

<tbody>
</tbody>
A3
Disable Process Failure Conditions

<tbody>
</tbody>
A4
If PH-ARB composite is active then set PH-ARB composite to stop

<tbody>
</tbody>
A5
Send Sync message 254 to Destination Unit

<tbody>
</tbody>
A6
Clear unit message 2

<tbody>
</tbody>
T10T10
Wait for actions to complete

<tbody>
</tbody>
S20
A1

<tbody>
</tbody>
Set #EM_INLET# to HOLD
A2Set #EM_PRESS# to HOLD

<tbody>
</tbody>
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I've got something in the pipeline and it's working so far... I think you'll like it.
 
Upvote 0
Here's a taster. It's still a work in progress, but it's progress. The idea is to parse the pasted data into a spreadsheet named "source" and the result to be deposited into a sheet named "Destination". The main idea was to filter out the junk then save the relevant values to an array to send to the destination sheet. It's a lot of work, but it's something at least that should work through over a million lines of code and condense it to something more manageable.
Code:
Sub mysub()

    Dim myHeading As Variant, g As Byte, ThisCell As String

    myHeading = Array("STEP NAME=" & Chr(34) & "S", _
                      "ACTION NAME", "Description", "TRANSITION ")
    
    With Sheets("Source").Columns("A:A")
        .ColumnWidth = 150
        .RowHeight = 15
    End With

        For g = 0 To 2
            Worksheets("Destination").Cells(1, g + 1).Value = myHeading(g)
        Next g
'   Now we search through the code on the Source sheet
    Worksheets("Source").Activate
    Cells(1, 1).Select
    
    Do Until IsEmpty(ActiveCell.Offset(1, 0).Value) = True And IsEmpty(ActiveCell.Value) = True
    ThisCell = ActiveCell.Value
        Select Case Len(ThisCell)
        '   Calculate the legnth of the data input
            Case Is < 2 '   If it's 1 then just delete it
                Selection.EntireRow.Delete  'HERE WE WANT TO STRIP OUT THE RUBBISH WE DON'T USE
            Case Else
                Debug.Print Left(ThisCell, Len(myHeading(0))) ' Remove this line to correct section
                'GoTo Last_Step
                g = 11
                '   correct to here
                Select Case Left(ThisCell, g)
                    Case Left(UCase(myHeading(0)), g) 'Checks position of the array 'myHeading'
Debug.Print Len(ActiveCell.Value) & " " & ActiveCell.Value
Move_On:                ActiveCell.Offset(1, 0).Select
                    Case Left(UCase(myHeading(1)), g)
Debug.Print Len(ActiveCell.Value) & " " & ActiveCell.Value
                        GoTo Move_On
                    Case Left(UCase(myHeading(2)), g)
Debug.Print Len(ActiveCell.Value) & " " & ActiveCell.Value
                        GoTo Move_On
                        Select Case Right(ActiveCell.Value, g) = "Logic" & Chr(34)
                            Case True 'Add special case  "N/A" to output array
RemoveIt:               Selection.EntireRow.Delete  'HERE WE WANT TO STRIP OUT THE RUBBISH WE DON'T USE
                        End Select
                    Case Else
                        GoTo RemoveIt
                End Select
Last_Step:
        End Select
    Loop
End Sub
 
Upvote 0
This is the basis upon which you can build something better. With the smart use of "SELECT CASE...CASE(n)...CASE ELSE" you should be able to tansfer the data to where you need it in a table. I will continue this, but as it's 2am here, I'm off to bed.
Code:
Sub mysub()

    Dim myHeading As Variant, g As Byte, ThisCell As String

    myHeading = Array("STEP NAME=" & Chr(34) & "S", _
                      "ACTION NAME", "Description", "TRANSITION ")
    
    With Sheets("Source").Columns("A:A")
        .ColumnWidth = 150
        .RowHeight = 15
    End With

        For g = 0 To 2
            Worksheets("Destination").Cells(1, g + 1).Value = myHeading(g)
        Next g
'   Now we search through the code on the Source sheet
    Worksheets("Source").Activate
    Cells(1, 1).Select
    
    Do Until IsEmpty(ActiveCell.Offset(1, 0).Value) = True And IsEmpty(ActiveCell.Value) = True
    ThisCell = ActiveCell.Value
        Select Case Len(ThisCell)
        '   Calculate the legnth of the data input
            Case Is < 2 '   If it's 1 then just delete it
                Selection.EntireRow.Delete  'HERE WE WANT TO STRIP OUT THE RUBBISH WE DON'T USE
            Case Else
                Debug.Print Left(ThisCell, Len(myHeading(0))) ' Remove this line to correct section
                'GoTo Last_Step
                g = 11
                '   correct to here
                Select Case Left(ThisCell, g)
                
                    Case Left(UCase(myHeading(0)), g) 'Checks position of the array 'myHeading'
                        Debug.Print Len(ActiveCell.Value) & " " & ActiveCell.Value
Move_On:                ActiveCell.Offset(1, 0).Select

                    Case Left(UCase(myHeading(1)), g)
                        Debug.Print Len(ActiveCell.Value) & " " & ActiveCell.Value
                        GoTo Move_On
                        
                    Case Left(UCase(myHeading(2)), g)
                        Debug.Print Len(ActiveCell.Value) & " " & ActiveCell.Value
                        
                        Select Case Right(ActiveCell.Value, 6) = "Logic" & Chr(34)
                            Case True 'Add special case  "N/A" to output array
                                GoTo RemoveIt
                            Case False
                                GoTo Move_On
                        End Select
                    Case Left(UCase(myHeading(3)), g)
                        Debug.Print Len(ActiveCell.Value) & " " & ActiveCell.Value
                        GoTo Move_On
                    Case Else
RemoveIt:               Selection.EntireRow.Delete  'HERE WE WANT TO STRIP OUT THE RUBBISH WE DON'T USE
                End Select
Last_Step:
        End Select
    Loop
End Sub
 
Upvote 0
Wow you are completly on the right track but did you see my excel file attachment on

Parsing Code Macro Trouble!

Because you are completely on the right track

but it gets more complex to label The Transition "T" cells down below the associated Step
 
Upvote 0
For the sample data posted here, try this in a copy of your workbook.
I think you'll find it considerably quicker than any of the other suggestions I have seen here or elsewhere. The issue will be whether it produces the results you want though.

Rich (BB code):
Sub StepAndTransition_v1()
  Dim a As Variant, b As Variant, ky As Variant, bits As Variant, itm As Variant
  Dim ds As Object, dt As Object, dcon As Object
  Dim sn As String, tn As String, act As String, desc As String, s As String
  Dim i As Long, pos As Long, k As Long
  Dim bInAction As Boolean, bInTransition As Boolean
  Dim rA As Range
  
  Set ds = CreateObject("Scripting.Dictionary")
  ds.CompareMode = 1
  Set dt = CreateObject("Scripting.Dictionary")
  dt.CompareMode = 1
  Set dcon = CreateObject("Scripting.Dictionary")
  dcon.CompareMode = 1
  a = Range("A1", Range("A" & Rows.Count).End(xlUp)).Value
  ReDim b(1 To UBound(a), 1 To 3)
  For i = 1 To UBound(a)
    If Not IsError(a(i, 1)) Then
      s = a(i, 1)
      pos = InStr(1, s, "=")
      If pos > 0 Then
        Select Case Left(s, pos)
          Case "STEP NAME="
            sn = Replace(Mid(s, 12), """", "")
            ds(sn) = vbNullString
            bInAction = False
          Case "ACTION NAME="
            act = Replace(Mid(s, 14), """", "")
            ds(sn) = ds(sn) & "::" & act
            bInAction = True
          Case "DESCRIPTION="
            desc = Replace(Mid(s, 14), """", "")
            Select Case True
              Case bInAction
                ds(sn) = ds(sn) & "||" & desc
              Case bInTransition
                dt(tn) = desc
            End Select
          Case "TRANSITION NAME="
            tn = Replace(Mid(s, 18), """", "")
            bInAction = False
            bInTransition = True
          Case "STEP_TRANSITION_CONNECTION STEP="
            dcon(Split(s, """")(1)) = Split(s, """")(3)
        End Select
      End If
    End If
  Next i
  For Each ky In ds.Keys
    k = k + 1
    b(k, 1) = ky
    If ds(ky) = vbNullString Then
      b(k, 2) = "N/A": b(k, 3) = "N/A"
    Else
      bits = Split(Mid(ds(ky), 3), "::")
      k = k - 1
      For Each itm In bits
        k = k + 1
        b(k, 2) = Split(itm, "||")(0): b(k, 3) = Split(itm, "||")(1)
      Next itm
    End If
    k = k + 1
    b(k, 1) = dcon(ky): b(k, 2) = b(k, 1): b(k, 3) = dt(b(k, 1))
  Next ky
  With Range("C1:E1")
    .Value = Array("Step and transition", "Action", "Description")
    .Offset(1).Resize(k).Value = b
    .EntireColumn.AutoFit
  End With
  For Each rA In Range("C2:C" & Range("D" & Rows.Count).End(xlUp).Row).SpecialCells(xlBlanks).Areas
    With rA.Offset(-1).Resize(rA.Rows.Count + 1)
      .MergeCells = True
      .VerticalAlignment = xlCenter
    End With
  Next rA
End Sub


For your 2nd set of data/results posted at Excel Forum, I don't understand. For example, the 2nd line of data is:
STEP NAME="A0000"
Why doesn't this step name appear in the results?
 
Upvote 0
Wow thats amazing!

Thank you so much

And the Step Name A0000 is a mystery to me, the automation services spit that out.



I only have one more request to ask you.

Would it be possible to get the

"POSITION= {X= Y=}" for the transitions

And

"RECTANGLE= { X=812 Y=915 H=40 W=120 }" for steps

If I could get the position that would be amazing

My ultimate goal is to make a chart out of this information


STEP OR TRANSITIONXY
S0070812915
T0425B4595024

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,688
Members
448,978
Latest member
rrauni

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top