HFSS ImportDXF and ImportAutoCAD
I am currently using 2020 R1 with an institutional license (I am an academic but this is not a student license) and am trying to add DXF/DWG importation support to a Python API module that I have. My license has DXF support (it allows me to import DXF and DWG as well as IGS and STEP) so I know that my license supports the functionality in the GUI. In following the scripting guide's example I wrote a little test function. The first picture is just to convince those reading that the ImportDXF is a valid bound method.
I then followed the example in the scripting help and the code did run, but it did not return anything, either an error or a successful importation (picture 2).
To ensure that it wasn't something in my DXF I did a manual import using the GUI and it successfully imported the DXF file (picture 3), seemingly indicating that the DXF is correctly formatted for importation.
I was puzzled so I played with the parameters and nothing has seemed to work. What is weirder is that the ImportDXF function doesn't respond to any user input, i.e if I pass in an empty parameter list or nonsense parameters it seemingly still runs without any returned error
I have never seen this behavior in any other function, and in any other case I would expect a COM error. For example, if I use the Import function (which I know works with 3D STEP files) then I return the expected COM exception:
I also know the normal Import functionality works in my API wrapper with no issues otherwise (when the correct parameter lists are passed in, of course).
This leads me to a few questions about how this function works and if it is something that may be enabled in the GUI but not in the API. I don't know why this would be the case, and the fact that it is an exposed bound method would indicate otherwise, but this doesn't make sense. Looking at the literature there is also an ImportAutoCAD functionality that works with both DXF and DWG filetypes, but there is not great documentation on the way it works, and I am a bit confused about the .edb file. First, in the scripting help, it gives a VB example:
This example however does not translate to Python (typo maybe?). If I expose the methods from the GetTool object, there is simply an ImporrAutoCAD (with the corresponding inputs from the example in the documentation, as shown in the image below). If I take the above (sans the ImportDXF and instead ImportAutoCAD) as follows (no control file):
The cell runs but I receive this warning message:
And these global messages:
And of course, no imported object whatsoever.
Anyway, for those who have made it this far, is there any information you can give about what is going on here? Neither of these seem to be working as intended, and unlike the normal Import method there seems to be some subtlety to how this works. If anyone has an answer for me, please send me a message. Finally, these are purely 2D objects that are generated from code and into a series of mask files for nanofabrication and then used in HFSS and Maxwell.