[Smtk-developers] Help

Shukla, Indu ERDC-RDE-ITL-MS Indu.Shukla at erdc.dren.mil
Wed Jun 24 14:28:46 EDT 2015


David,

Thank you so much for your prompt reply. 

I have tried using this line of code "asys = smtk.attribute.System()" but I get this error.

''NotImplementedError: 'smtk::attribute::Item' represents a C++ abstract class and cannot be instantiated". Am I missing some library?

Indu

-----Original Message-----
From: David Thompson [mailto:david.thompson at kitware.com] 
Sent: Wednesday, June 24, 2015 11:11 AM
To: Shukla, Indu ERDC-RDE-ITL-MS
Cc: smtk-developers at smtk.org; Hines, Amanda M ERDC-RDE-ITL-MS
Subject: Re: [Smtk-developers] Help

Hi Indu,

> I am Indu Shukla from ERDC, ITL. I have developed a .sbt file with a list of instance view and attribute view. We are not using our sbt files to run any kind of simulation. We only want to use this simulation template just as a form. Upon submission our python script is expected to read the values from the text boxes/radio buttons/drop downs/checkboxes from the simulation template and write them into Json format.
> 
> Since I don't have access to SMTK API documentation I am running into issue how to access the those instance views/attribute views and their values. I am attaching me .sbt file here, please explain me through some examples how to access those controls and their values.

There is a user's guide (with links to reference API documentation) at:

  http://smtk.readthedocs.org/en/latest/

and in particular, some information about using python:

  http://smtk.readthedocs.org/en/latest/tutorials/python_first_steps/index.html

In terms of reading an attribute from an SBT file, this test is an example of how to do so from a Python script, starting at line 55:

https://github.com/Kitware/SMTK/blob/master/smtk/attribute/testing/python/definitionDefaultValueTest.py#L55

and these Python tests are examples of how to access items in the attribute:

  https://github.com/Kitware/SMTK/blob/master/smtk/attribute/testing/python/attributeFindItemTest.py
  https://github.com/Kitware/SMTK/blob/master/smtk/attribute/testing/python/attributeItemByPath.py

	Hope this helps,
	David


More information about the Smtk-developers mailing list