微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > CST macro VBA for transform a brick

CST macro VBA for transform a brick

时间:03-29 整理:3721RD 点击:
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

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top