[Smtk-developers] (UNCLASSIFIED) Attribute question

Shukla, Indu ERDC-RDE-ITL-MS Indu.Shukla at erdc.dren.mil
Wed Jul 22 11:28:44 EDT 2015


SMTK Developers,

I have a list of study as an attribute view. I am using this list of study as a drop down in my another tab.

This code snippet from of my Study tab from my sbi file


<Att Name="Study-0" Type="Study" ID="755a7651-ae02-4c8b-b503-48350b863898">

      <Items>

        <Group Name="ModelInformation">

          <String Name="modelused">SMTK</String>

          <String Name="studytimeframe">FY 2015</String>

          <String Name="modelversion">SMTK 4.0</String>

        </Group>

This is where I use it as a drop down


 <Att Name="Images-0" Type="Images" ID="04ddf225-6dc6-4570-8ad8-f99e461add41">

      <Items>

        <File Name="Images">

          <RecentValues>

            <Val>/Users/indushukla/Desktop/ISEP Files/CollectionFromShell.png</Val>

          </RecentValues>/Users/indushukla/Desktop/ISEP Files/CollectionFromShell.png</File>

        <String Name="ImageDescription">This belongs to study0</String>

        <String Name="Study" Expression="true">Study-0</String>

      </Items>

    </Att>


Here’s the python script I am using to access the Study-0 from the above code

image_att = asys.findAttributes('Images’)


for image in image_att:

        d={}

        if study_item.name()==smtk.attribute.to_concrete(image.item(2)).value(0):

            d['file'] = smtk.attribute.to_concrete(image.item(0)).value(0)

            d['description'] = smtk.attribute.to_concrete(image.item(1)).value(0)

            d[‘Images'] = smtk.attribute.to_concrete(image.item(2)).value(0)

            lst.append(d)



But smtk.attribute.to_concrete(image.item(2)).value(0) doesn’t return any value while rest of them do. Do we access them differently?


Thanks,


Indu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20150722/520ad4f7/attachment.html>


More information about the Smtk-developers mailing list