Pydpf commands html
Best Answers
-
Use this code to generate the DPF doc in .html format from Mechanical:
import mech_dpf import Ans.DataProcessing as dpf my_output_path = (r"D:\Test\Resources") op = dpf.operators.utility.html_doc() op.inputs.output_path.Connect(my_output_path) op.Run()
1 -
Indeed this is another place you can get the documentation. However this link is the one to the PyDPF documentation, so you will only see the CPython example of usage.
1
Answers
-
Thank you for this commands.
0 -
I see similar code snippets and manual from here:
https://dpf.docs.pyansys.com/version/stable/operator_reference_load.html0 -
Hi, I am running the equivalent html documentation in Cpython on linux:
from ansys.dpf import core as dpf my_output_path = ('/linux/path/to/my/documentation/') op = dpf.operators.utility.html_doc() #operator instantiation op.inputs.output_path.connect(my_output_path) op.run()
I receive the following error (resulting from op.run() line):
ansys.dpf.gate.errors.DPFServerException: html_doc:0<-basic_string::replace: __pos (which is 18446744073709551615) > this->size() (which is 0)0 -
Something could be incorrect in the path definition. Could you try without providing a path ? The default will be working directory.
0 -
Run from the following lines:
op = dpf.operators.utility.html_doc() #operator instantiationop.inputs.output_path.connect() # Tried with and without commenting this line
op.run()
Created the following error message:
File ".../python3.9/site-packages/ansys/dpf/core/dpf_operator.py", line 645, in run
self.get_output()
File ".../python3.9/site-packages/ansys/dpf/core/dpf_operator.py", line 488, in get_output
return self._api.operator_run(self)
File ".../python3.9/site-packages/ansys/dpf/gate/generated/operator_capi.py", line 696, in operator_run
raise errors.DPFServerException(sError.value)
ansys.dpf.gate.errors.DPFServerException: html_doc:0<-basic_string::replace: __pos (which is 18446744073709551615) > this->size() (which is 0)It does create dataProcessingDoc.html with 0 KB.
0 -
This looks like a bug. Could you please report it by creating an issue here? https://github.com/ansys/pydpf-core/issues Thank you
0 -
Noted. Thanks!
0