Macro to loop over derived parts
Hi,
Does anyone know how to loop over a specific type of derived parts (e.g. plane sections, line probes, etc) using a Java macro? |
you could loop over all the parts and then use an if statement to check the class of each part. Use only the ones you want.
|
Thanks kguntur, this works fine. :)
For reference, here is my understanding of your suggestion: Code:
Simulation simulation_0 = getActiveSimulation(); |
You are right. the if statement would look something like this.
String compare = "PlaneSection"; if (part.getClass().toString().contains(compare)){ //do something with the part } you can just print the class for all the parts to get your "compare" variable. |
All times are GMT -4. The time now is 03:53. |