A simple demonstration showing how to create an ASCII subcircuit model from a hierarchical schematic.
Extracting an ASCII Subcircuit from Simulation Input Files
Make a copy of your working hierarchical schematic.
Open that copy in SIMetrix / SIMPLIS.
Run a simulation to ensure that the copy works, and to generate the simulation input containing the ASCII subcircuit.
From the "SIMPLIS" menu of the SIMetrix Command Window, choose "Edit Netlist (after preprocess)". (If yours is a SIMetrix circuit, instead choose "Edit Netlist" from the "Simulator" menu.)
In the resulting text editor window, extract the subcircuit definition and save it in a separate file. In choosing a name for your subcircuit, remember that it should start with a letter and contain only letters, numbers and the "_" character.
Preparing the Schematic to Use a Subcircuit
Right click on the symbol of the component for which you wish to create an ASCII subcircuit.
From the context menu, choose "Edit Symbol". This will bring up the Symbol Editor window.
From the "Property / Pin" menu of the Symbol Editor, choose "Edit Properties".
Look for a property named "VALUE" (case does not matter).
If that property exists, double click on it to bring up the "Edit Property" dialog.
If that property does not exist...
Close the "Edit Properties" dialog.
From the "Property / Pin" menu of the Symbol Editor, choose "Add Property".
In the "Add Property" dialog, type "VALUE" for the name of the property.
Either in the "Edit Property" dialog or the "Add Property" dialog, depending on the result of the previous step, enter the previously chose name of the ASCII subcircuit as the value.
Choose "OK", and if necessary, close the "Edit Properties" dialog.
From the "File" menu of the Symbol Editor, choose "Save".
In the "Save Symbol" dialog, make sure the following options are set...
"Save To" should be set to "Current schematic file".
"User Name" and "Internal Name" should be the same.
Choose "OK" and the symbol will be saved to the top level schematic.
In the Schematic Editor, press the "Q" key. This will allow you to place an instance of your newly saved symbol on the schematic. Do so, replacing the old symbol instance with the new one.
At this point, were you to attempt a simulation, SIMPLIS should complain that it is unable to find the definition of your device's subcircuit model. This confirms that SIMPLIS is now looking for an ASCII text definition of the subcircuit rather than a component schematic file.
To provide the ASCII subcircuit, you can either include it in the top level schematic F11 window, or you can create a library file and add it to the SIMetrix / SIMPLIS model library.
Include the ASCII Subcircuit in the Top Level Schematic
In the Schematic Window, hit the F11 key to open the F11 window for that schematic.
In the now-revealed textarea, paste in the subcircuit definition from the ASCII file where you saved it previously.
Save your schematic (choose "Save" from the "File" menu in the Schematic Window).
Include the ASCII Subcircuit in an External Library File
If the file in which you previously saved the ASCII subcircuit definition does not have a .txt or a .lb file extension, save a copy with that extension now.
If your subcircuit is intended for SIMPLIS, add the following line to the top of the file.
.SIMULATOR SIMPLIS
Save any outstanding changes to your file, then, in Windows Explorer, drag the file into the SIMetrix Command Window.
A dialog box will pop up asking you to confirm that you want to install the library file. Click "OK".
The SIMetrix Command Window will display the following text.
At this point, whether you opted to include the ASCII subcircuit definition in the top level schematic F11 window or in an external file, your simulation should run properly.