+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>\r
-<HEAD>\r
-<!-- hennerik CVSweb $Revision$ -->\r
-<TITLE>Example</TITLE></HEAD>\r
-<BODY BGCOLOR="#eeeeee">\r
-<HR noshade><PRE>#%AttributeExpandable interface(creations/saving/restoring)%\r
-#%SALOMEDS methods : SaveAs FindComponent FindAttribute Open%\r
-#%Attribute methods : SetExpandable IsExpandable%\r
-\r
-# create AttributeExpandable\r
-#===========================================================\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute( batchmode_geompy.father, "AttributeExpandable")\r
-if A == None :\r
- raise RuntimeError, "Can't create AttributeExpandable attribute"\r
-A = A._narrow(SALOMEDS.AttributeExpandable)\r
-\r
-if A == None :\r
- raise RuntimeError, "Can't create AttributeExpandable attribute"\r
-\r
-A.SetExpandable(1)\r
-\r
-if A.IsExpandable() == 0:\r
- "Error: wrong value of AttributeExpandable"\r
-\r
-\r
-# save / restore study \r
-#============================================================\r
-str= os.getenv("TmpDir")\r
-if str == None:\r
- str = "/tmp"\r
-file = str+"/test.hdf"\r
-\r
-batchmode_geompy.myStudyManager.SaveAs(file, batchmode_geompy.myStudy)\r
-openedStudy = batchmode_geompy.myStudyManager.Open(file);\r
-\r
-if openedStudy == None:\r
- raise RuntimeError, "Can't open saved study!"\r
-\r
-father = openedStudy.FindComponent("GEOM")\r
-if father is None:\r
- raise RuntimeError, "Geom component is not found! Wrong study is opened." \r
-\r
-\r
-# find AttributeExpandable\r
-#============================================================\r
-\r
-res,A=father.FindAttribute("AttributeExpandable")\r
-if res == 0 or A == None:\r
- raise RuntimeError, "Error: not found AttributeExpandable"\r
-\r
-A = A._narrow(SALOMEDS.AttributeExpandable)\r
-\r
-if A == None :\r
- raise RuntimeError, "Can't create AttributeExpandable attribute"\r
-\r
-if A.IsExpandable() == 0:\r
- "Error: wrong value of AttributeExpandable"\r
-\r
-</PRE>
\ No newline at end of file