Dear Paraviewers,

I am kind of a newby and can't figure out how to access in a custom plugin the 
string with the name of a scalar field from an input.

I followed informations in Pat Marion's page 
https://blog.kitware.com/easy-customization-of-the-paraview-python-programmable-filter-property-panel/
 and add a snippet from 
http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Drop_down_list_with_values_from_input_arrays.

But if I managed to use variables from a DoubleVectorProperty by calling its 
name property from my script, I can't figure out how to access the name of my 
arrays in the StringVectorProperty populated with SetInputArrayToProcess 
command.

Maybe I am not using the right tools. My goals is to get the string name of my 
array to read pointdata.
Today I can access it by hardcoding the name in my programmable script :

self.array = 'CHAMP___ACCELERATION___001'
inputs[0].PointData[self.array][:,0]

I'd like to get  'CHAMP___ACCELERATION___001' from a drop down list. With the 
following snippet the list is populated but I can't access the string selected. 
That must be simple...

      <StringVectorProperty name="SelectInputScalars"
                          label="Array"
                          command="SetInputArrayToProcess"
                          number_of_elements="5"
                          element_types="0 0 0 0 2"
                          animateable="0">
        <ArrayListDomain name="array_list"
                         attribute_type="Scalars"
                         input_domain_name="inputs_array">
          <RequiredProperties>
            <Property name="Input"
                      function="Input" />
          </RequiredProperties>
        </ArrayListDomain>
        <FieldDataDomain name="field_list">
          <RequiredProperties>
            <Property name="Input"
                      function="Input" />
          </RequiredProperties>
        </FieldDataDomain>
      </StringVectorProperty>

I am not sure my message (and my English) are very clear...

Thank you very much for your incoming help !

Alfred



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to