This example is stored in file “COMEX/EX05/testClaFem.rb”. It corresponds to the example “RUBY/EX15/testClaFem.rb” described in section IV.3.6. Just one remark about this example: the COM methods do not accept the ruby “Hash” arguments. Therefore, this argument must be translated into Arrays the elements of which are Arrays of two elements corresponding to the keys and values respectively. In ruby, this operation is done by calling the “to_a” method of Hash class. For example, the insertion of allowables in a Laminate is done as follows:
The example is also translated in python in file “COMEX/EX05/testClaFem.py”. Then, the “items” method of “map” class is used to produce an Array suitable for allowables insertion:
Note also the use of “Dispatch” method in python to retrieve Result objects from an Array like in the following statements:
(We presume that the “Dispatch” statement is necessary to convert a VARIANT.)