Personal tools
You are here: Home Forum Use gg = ImportComponentGUI("GEOM") fail in batchmode

gg = ImportComponentGUI("GEOM") fail in batchmode

Up to Use
  • gg = ImportComponentGUI("GEOM") fail in batchmode

    Posted by Bonaccorsi at January 09. 2006
    Hello,

    I'm trying to make GEOM object in batchmode. In really i make GEOM Object in a XDATA module.
    In SALOME GUI environment i do that :

    from geompy import *

    v=MakeVertex(0,0,0)
    id_v=addToStudy(v,'v')
    gg.createAndDisplayGO(id_v)

    next vertex 'v' is visible in SALOME GUI environment.

    My problem is in batchmode_geompy there's not the gg variable, and when i do :

    from batchmode_salome import *

    ImportComponentGUI("GEOM";)

    this throws an Exception:

      File "/home/tbonacco/SALOME_2_2_7/SALOME_BUILD/KERNEL_2.2.7/bin/salome/import_hook.py", line 83, in import_hook
        module= original_import(name, globals, locals, fromlist)
    ImportError: /home/tbonacco/SALOME_2_2_7/SALOME_BUILD/KERNEL_2.2.7/lib/salome/libVTKViewer.so.0: undefined symbol: _ZN13SALOMEDS_Tool14GetAllChildrenE17_CORBA_ObjRef_VarIN8SALOMEDS13_objref_StudyENS1_12Study_HelperEES0_INS1_15_objref_SObjectENS1_14SObject_HelperEERSt4listIS7_SaIS7_EE


    How can i proceed to DISPLAY my GEOM object in SALOME GUI in batchmode?

    Thanks in advance,

    Thomas
    • Re: gg = ImportComponentGUI("GEOM") fail in batchmode

      Posted by Erwan ADAM at January 18. 2006
      Hi Thomas,

      When you create the geom shape for the python console in
      salome (it's what you are doing when you write
      ...
      from geompy import *

      v=MakeVertex(0,0,0)
      id_v=addToStudy(v,'v')
      gg.createAndDisplayGO(id_v)
      ...)
      you are in the same process than the salome gui. So it makes
      sense to ask the gui to display the shape.

      But if you create the shape in a XObject object (I assume it's
      what you are trying to do), the XObject object is in an other
      process (a container python one) which can be on a remote
      computer ... thus you cannot ask the gui to display the shape
      (More-over, you are not sure the salome gui exists for instance
      if you are in pure bach mode "without iapp";).

      Indeed, I think there is a way to do that with xdata ... Please
      send a message on the xdata diffusion list for me not to
      forget to try to do that ...

      Cheers,

                       E.A.

Powered by Ploneboard
Document Actions