Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

CST macro VBA for transform a brick

sajadtavasol

Newbie level 1
Joined
Jul 31, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
9
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

 

Toggle Sidebar

Part and Inventory Search


Welcome to EDABoard.com

Sponsor

Sponsor

Design Fast


×
Top