Skip to content

Commit 034b5e1

Browse files
srpyprimepyansys-ci-botwaltersma
authored
Update fileio.rst (#980)
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Martin Walters <[email protected]>
1 parent 12beeab commit 034b5e1

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update fileio.rst

doc/source/user_guide/fileio.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ You can specify the import route for CAD files using the :class:`CadReaderRoute
5757
.. code-block:: python
5858
5959
params = prime.ImportCadParams(
60-
model=model, cad_reader_route=prime.CadReaderRoute.SPACECLAIM
60+
model=model, cad_reader_route=prime.CadReaderRoute.DISCOVERY
6161
)
6262
prime.FileIO(model).import_cad(file_name=mixing_elbow, params=params)
6363
@@ -66,9 +66,9 @@ Alternatively, you can use the :class:`Mesh <ansys.meshing.prime.lucid.Mesh>` cl
6666
.. code-block:: python
6767
6868
mesh_util = prime.lucid.Mesh(model=model)
69-
mesh_util.read(file_name=mixing_elbow, cad_reader_route=prime.CadReaderRoute.SPACECLAIM)
69+
mesh_util.read(file_name=mixing_elbow, cad_reader_route=prime.CadReaderRoute.DISCOVERY)
7070
71-
Four CAD import routes are available in PyPrimeMesh:
71+
Five CAD import routes are available in PyPrimeMesh:
7272

7373
* ``Program controlled``: Chooses the CAD reader route based on the extension of the provided CAD file as follows:
7474

@@ -88,17 +88,25 @@ Four CAD import routes are available in PyPrimeMesh:
8888
Ensure to install Discovery for Discovery reader.
8989

9090
* ``Workbench``: Uses Workbench to import supported CAD files from the Workbench reader.
91-
Ensure to install Workbench for Workbench reader.
91+
Ensure to install Workbench for Workbench reader.
9292

93+
.. note:
94+
* When you import CAD using the SpaceClaim or Discovery reader routes the user import options in those applications are ignored.
95+
96+
* If the options are required then you can import CAD in the application stand-alone with the options defined and export it to a native format (FMD or PMDB) to import into Ansys Prime Server.
97+
9398
To view the CAD files supported for the Workbench route on different platforms, see
9499
`CAD Support <https://www.ansys.com/it-solutions/platform-support>`_ on the Ansys website.
95100

96101
.. note::
97102
* Program controlled supports faceted data. Workbench supports BRep geometry(non-faceted) data.
98103
Discovery or SpaceClaim supports both BRep geometry and faceted data.
99104

100-
* When deploying scripts using SpaceClaim, Discovery, or Workbench CAD reader routes, ensure that the CAD configuration
101-
and in-app defaults are consistent in the deployed environment.
105+
* When deploying scripts using the Workbench CAD reader route, ensure that the user options for the installed
106+
application are consistent in the deployed environment.
107+
108+
* When deploying scripts using the CAD configuration, ensure that the configuration is consistent in the deployed
109+
environment.
102110

103111
* You must install and configure Workbench CAD readers or plug-ins (Ansys Geometry Interfaces)
104112
while installing Ansys Workbench.
@@ -120,15 +128,15 @@ you to append a CAD file to the model:
120128
.. code-block:: python
121129
122130
params = prime.ImportCadParams(model=model, append=True)
123-
prime.FileIO(model).import_cad(file_name="cad_to_append.scdoc", params=params)
131+
prime.FileIO(model).import_cad(file_name="cad_to_append.dsco", params=params)
124132
125133
Alternatively, you can use the :class:`Mesh <ansys.meshing.prime.lucid.Mesh>` class in
126134
the Lucid API:
127135

128136
.. code-block:: python
129137
130138
mesh_util = prime.lucid.Mesh(model=model)
131-
mesh_util.read("cad_to_append.scdoc", append=True)
139+
mesh_util.read("cad_to_append.dsco", append=True)
132140
133141
Parametric CAD update
134142
---------------------
@@ -142,7 +150,7 @@ This code gets existing CAD parameters while importing:
142150
143151
params = prime.ImportCadParams(model=model)
144152
params.cad_reader_route = prime.CadReaderRoute.WORKBENCH
145-
result = prime.FileIO(model).import_cad(file_name="parametric_cad.scdoc", params=params)
153+
result = prime.FileIO(model).import_cad(file_name="parametric_cad.dsco", params=params)
146154
147155
.. code-block:: pycon
148156
@@ -157,7 +165,7 @@ This code sets the parameters that are used for the import:
157165
params = prime.ImportCadParams(model=model)
158166
params.cad_reader_route = prime.CadReaderRoute.WORKBENCH
159167
params.cad_update_parameters = {"my_param": 2}
160-
result = prime.FileIO(model).import_cad(file_name="parametric_cad.scdoc", params=params)
168+
result = prime.FileIO(model).import_cad(file_name="parametric_cad.dsco", params=params)
161169
162170
.. code-block:: pycon
163171

0 commit comments

Comments
 (0)