[Smtk-developers] Help

David Thompson david.thompson at kitware.com
Wed Jun 24 12:10:58 EDT 2015


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