Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Looking for construction macros for CST

Status
Not open for further replies.

kato01

Full Member level 2
Joined
Dec 2, 2002
Messages
123
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,298
Activity points
831
Hi,

I am looking for more examples of macros for CST.
Mainly construction macros.

I wrote a macro for the construction of a dielectric rod, which I could share.

I was not able to figure out how to perform the LOFT COMMAND in a macro; same about select face etc.

The documentation provided by CST seems to be VERY poor.
At least they could have added one example per item in their VBA Macro Language "Help"

Kato01
 

vb macro in cst

Which of the CST products are you using?
 

cst user defined goals

Sorry, I'm talking about Microwave Studio
 

cst + user defined goal

Hi kato01,

you're right about the lack of examples however I have a trick to propose.
Suppose for example that you want to use the LOFT method.You could create a dummy project where you could do a LOFT as usual,I mean Objects->Loft.Then,you could open the History and by choosing to Edit the Loft command (which will be obvious in the history list) you could figure out how this command (or method) is used.The same applies to any other method.Anyway,the syntax of the LOFT method is:

With Loft
.Reset
.Name <a string that contains the name of the solid to be created>
.Layer <a string that contains the name of the layer of that solid>
.Tangency <here goes the tagency,however please see Note1>
.CreateNew
End With

Note1:In version 4,you are allowed to give an numerical value as a string i.e. in the Tagency field you could enter either "0" or just 0.But in version 4.2 you can't use strings where numerical values are expected.I've no idea about other older versions,however bear this in mind cause it may cause bugs.

Note2:If you don't have the name of the solid etc stored in a string variable but you want to write it directly you must use double quotes.
(another bug source)

Note3:The LOFT method assumes that two faces have already been picked.So,the PICK method (or one of the many PICKs) you need is :

Pick.PickFaceFromId <the name of the layer>:<the name of the solid belonging to that layer> , ID

The ":" and "," above are required.

ID is a number describing the orientation of the selected face.Assume you have a cube.If you look at it towards -z then you see the face with ID=1.
+z ID=2
+y ID=3
+x ID=4
-y ID=5
-x ID=6

I don't know about a cylinder but you could create one and select all its faces in turn and see their ID by checking the history list.

By the way,I believe that *.mod examples are also very useful.There are some on the "CERN and C/S/T page" (link already posted).I've combed the web and found ... just those.Why?Is it illegal for one to publish them?Or just uncommon?

Anyway,I hope I helped you kato01.
Cheers
 
  • Like
Reactions: l3x057

    V

    Points: 2
    Helpful Answer Positive Rating

    l3x057

    Points: 2
    Helpful Answer Positive Rating
cst user defined goal example

Hi all,

i think the macros are visual basic so nobody publishes them and most macros are written to cater to individual use so it might not be helpful to everyone. Most of the time they are very short about 1-20 lines. VB is easy to learn and your "trick" can be very helpful to hose who do not know the VB language. I think the examples in the advance manual is sufficent to get a beginner started on some simple projects.

I was just wondering how many people who uses MWS actually knows VB as well?

Cheers,
Element7k
racoon said:
Hi kato01,

you're right about the lack of examples however I have a trick to propose.
Suppose for example that you want to use the LOFT method.You could create a dummy project where you could do a LOFT as usual,I mean
 

cst macro help

Does there any example of macro of user defined goal optimization?such as coupler's phase error optimization?
 

macro in cst

racoon said:
you're right about the lack of examples however I have a trick to propose.
...You could create a dummy project ...Then,you could open the History and by choosing to Edit ...

I also think this is the easiest way to do macros in CST. I did some time ago a macro to draw the complete edge coupled filter once you supply dimensions in Edit/Parameters menu dialog box. It was completely relaying on examining History and writting a macro based on the content of commands inside it.

Concerning accessing more sophisticated features like optimization goals however History box might not supply valuable information at all, so I think this approach is not the right one. I am not sure for past releases, but for 5.1 version they included VBA macro help in Help menu, even postprocessing features are explained in details.

Probably manu of the custommers had complained in the past...

flyhigh
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top