Hello every body.
I have a problem in CST macro VBA.
I have 10 component in CST studio with name : component1, component2, component3,.....component10, and in each one of this ten component, I have 10 brick with name: c_1 , c_2 , c_3,........c_10.
Now i want to transform(rotate) each brick by a simple function, i write it in macro vba, similar to the one below and i cant do it, can you help me, where is my mistake?
Code Visual Basic - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Sub Main
    Dim m, l As Integer
    For m=0 To 9
        For l=0 To 9
         With Transform
 
.Reset
    .Name(c_& l)
    .component(Component & m)
     .Origin "Free"
     .Center "0.5+m", "0.5+l", "0"
     .Angle "0", "0", "20*l"
.MultipleObjects "False"
     .GroupObjects "False"
     .Repetitions "1"
     .MultipleSelection "False"
     .Transform "Shape", "Rotate"
End With
 
 Next
    Next