[Smtk-developers] Help
David Thompson
david.thompson at kitware.com
Wed Jun 24 14:54:40 EDT 2015
Hi Indu,
It would help to see the script you are running instead of trying to guess what is happening from an error message.
David
> On Jun 24, 2015, at 2:53 PM, Shukla, Indu ERDC-RDE-ITL-MS <Indu.Shukla at erdc.dren.mil> wrote:
>
> David,
>
> Yes, I did had smtk.attribute.Item(). But the compiler still doesn't understands that code. It says "Undefined variable from import:System"
>
> Thanks,
>
> Indu
>
> -----Original Message-----
> From: David Thompson [mailto:david.thompson at kitware.com]
> Sent: Wednesday, June 24, 2015 1:34 PM
> 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,
>
> The error does not look like a library issue. Library issues would show up when you run "import smtk". The only way it could be a library issue is if you have multiple versions of the same SMTK libraries and are loading in mismatched versions.
>
> Are you certain that line is the one causing the problem? If I run
>
> import smtk
> smtk.attribute.Item()
>
> I get the error you are reporting (because indeed Item is an abstract class). Does "smtk.attribute.Item()" appear anywhere in your script?
>
> David
>
>> On Jun 24, 2015, at 2:28 PM, Shukla, Indu ERDC-RDE-ITL-MS <Indu.Shukla at erdc.dren.mil> wrote:
>>
>> 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/ind
>> ex.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/pyt
>> hon/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/pyt
>> hon/attributeFindItemTest.py
>> https://github.com/Kitware/SMTK/blob/master/smtk/attribute/testing/pyt
>> hon/attributeItemByPath.py
>>
>> Hope this helps,
>> David
>
More information about the Smtk-developers
mailing list