I was trying the new FDTD ports. However, I keep getting an error.
There is an error with the simulation region, the port cannot be added.
I am not sure why. I removed all the objects.
Would you please help me with this file portFDTD.fsp (265.1 KB) ?
I originally thought that there is a problem with the software, but then @fgomez and I realized that you can not edit any object under the Objects Tree. This happens when you use an script on model->Setup that starts with deleteall. Thus, you can not edit (or add, delete) any objects from GUI (and you are limited to use commands under model for any changes).
To be more precise, software runs script in model anytime that there is an update on Objects Tree. Therefore, when you add a port using GUI, it adds the port into your simulation but runs the model->script right after it (since there was an update on Objects Tree). Your script on model->Setup starts with deleteall and thus removes everything from Objects Tree and updates the it again. As a result you are not seeing any change on the number of ports.
If you take out deleteall from your codes you might have two cases:
a) if your code starts with addfdtd, you will get a red line on the CAD environment around simulation region meaning that there was an error with your script. This is because you can not add a second simulation region if you already have one (as your code constantly runs and tries to update anything under model)
b)If your code starts with something like addports, you will constantly add port anytime that there was an update into your Objects Tree.
The main difference between using scripts under model and Script File Editor is that you don’t have the above mentioned limitation with Script File Editor i.e. you can use GUI to add objects if you have used Script File Editor, and it won’t run unless you ask the software to do so. Scripts under model are very useful for parametrization, and care must be taken.
I hope this clarifies the problem.
Thanks for your reply. But let me clarify that I don’t attempt to add the ports using GUI. In fact, I get this error when I test the model script. And adding any object other than the port works fine as seen below.
Thank you for clarification. It seems to be a bug with the new version.
It looks like even you get the Error, port will be added to your objects tree and I guess you can ignore the error message for now.
Sorry for the inconvenience, and the bug is reported to be fixed in the next release.