X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fhtml%2FINPUT%2Fexemple%2FExample9.html;fp=doc%2Fhtml%2FINPUT%2Fexemple%2FExample9.html;h=0000000000000000000000000000000000000000;hb=1b19d95e647335f4bec1c00d3f979e3e669d81eb;hp=6809dab3c4ebbefed56481593feacd65897bc9a4;hpb=bb19781277b895352e1b399e29bdbe117ee5d64a;p=modules%2Fkernel.git diff --git a/doc/html/INPUT/exemple/Example9.html b/doc/html/INPUT/exemple/Example9.html deleted file mode 100755 index 6809dab3c..000000000 --- a/doc/html/INPUT/exemple/Example9.html +++ /dev/null @@ -1,59 +0,0 @@ - -
- -#%AttributeSelectable interface(creations/saving/restoring)% -#%SALOMEDS methods: FindOrCreateAttribute, SaveAs, FindComponent, FindAttribute, Open% -#%Attribute methods: SetSelectable, IsSelectable% - -# create AttributeSelectable -#=========================================================== -A = batchmode_geompy.myBuilder.FindOrCreateAttribute(batchmode_geompy.father, "AttributeSelectable") -if A == None : - raise RuntimeError, "Can't create AttributeSelectable attribute" -A = A._narrow(SALOMEDS.AttributeSelectable) - -if A == None : - raise RuntimeError, "Can't create AttributeSelectable attribute" - -A.SetSelectable(1) - -if A.IsSelectable() == 0: - "Error: wrong value of AttributeSelectable" - - -# save / restore study -#============================================================ -str= os.getenv("TmpDir") -if str == None: - str = "/tmp" -file = str+"/test.hdf" - -batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy) -openedStudy = batchmode_geompy.myStudyManager.Open(file); - -if openedStudy == None: - raise RuntimeError, "Can't open saved study!" - -father = openedStudy.FindComponent("GEOM") -if father is None: - raise RuntimeError, "Geom component is not found! Wrong study is opened." - - -# find AttributeSelectable -#============================================================ - -res,A=father.FindAttribute("AttributeSelectable") -if res == 0 or A == None: - raise RuntimeError, "Error: not found AttributeSelectable" - -A = A._narrow(SALOMEDS.AttributeSelectable) - -if A == None : - raise RuntimeError, "Can't create AttributeSelectable attribute" - -if A.IsSelectable() == 0: - "Error: wrong value of AttributeSelectable" - -\ No newline at end of file