]> SALOME platform Git repositories - plugins/xtplugin.git/blob - doc/salome/examples/XTPlugindemo.py
Salome HOME
fd271259a4f88550c6cec6d2fce19189d09bb96d
[plugins/xtplugin.git] / doc / salome / examples / XTPlugindemo.py
1 # Import XT
2
3 import salome
4 salome.salome_init()
5 import GEOM
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8
9 # - path to the file
10 xtFile = "/path/to/the/xt/file.x_t"
11
12 if os.path.exists(xtFile):
13     # - import shape
14     shape = geompy.ImportXT(xtFile)
15
16     # - publish in study
17     geompy.addToStudy(shape, "ImportXT")
18
19 else:
20     print "ERROR: File %s does not exist" % xtFile