# Using SMTK

**URL:** https://discourse.kitware.com/c/smtk/using-smtk/14.md

[Latest](https://discourse.kitware.com/latest.md) · [Categories](https://discourse.kitware.com/categories.md)

---

## [About the Using SMTK category](https://discourse.kitware.com/t/about-the-using-smtk-category/477)

<div class="topic-metadata">

**Author:** [@kitware-sysadmin](https://discourse.kitware.com/u/kitware-sysadmin)\
**Replies:** 0

</div>

This category is for discussions about how to use SMTK in your application, and specifically for questions on how to use the API SMTK provides. This category includes questions about how to integrate external applicatio…

---

## [How to import a .vtu file programmatically?](https://discourse.kitware.com/t/how-to-import-a-vtu-file-programmatically/1650)

<div class="topic-metadata">

**Author:** [@CsatiZoltan](https://discourse.kitware.com/u/CsatiZoltan)\
**Replies:** 2\
**Last updated:** [December 5, 2025, 4:46am UTC](https://discourse.kitware.com/t/how-to-import-a-vtu-file-programmatically/1650 "2025-12-05T04:46:35Z")

</div>

Hi, When I import a VTU file (e.g. the example file data/mesh/3d/nickel\_superalloy.vtu) in CMB, it loads it successfully, displaying the following message in the Output Messages window: INFO: smtk::session::vtk::Import…

---

## [SMTK documentation is not searchable](https://discourse.kitware.com/t/smtk-documentation-is-not-searchable/1641)

<div class="topic-metadata">

**Author:** [@CsatiZoltan](https://discourse.kitware.com/u/CsatiZoltan)\
**Replies:** 3\
**Last updated:** [November 19, 2025, 2:37pm UTC](https://discourse.kitware.com/t/smtk-documentation-is-not-searchable/1641 "2025-11-19T14:37:27Z")

</div>

Does the search box work for you in the ReadTheDocs documentation of SMTK? For me, whatever I type, it does not load. Tested on Firefox with extensions disabled. It has been showing it for more than ten minutes.

---

## [How to design .sbt files?](https://discourse.kitware.com/t/how-to-design-sbt-files/1648)

<div class="topic-metadata">

**Author:** [@CsatiZoltan](https://discourse.kitware.com/u/CsatiZoltan)\
**Replies:** 1\
**Last updated:** [November 16, 2025, 5:12am UTC](https://discourse.kitware.com/t/how-to-design-sbt-files/1648 "2025-11-16T05:12:34Z")

</div>

I see the following ways to write .sbt files, which are responsible for the automatic creation of GUI widgets in CMB. Write them manually Find a similar example in smtk/data/attribute/attribute\_collection and adapt it…

---

## [Regular expressions in SMTK](https://discourse.kitware.com/t/regular-expressions-in-smtk/924)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 0\
**Last updated:** [November 3, 2022, 2:44pm UTC](https://discourse.kitware.com/t/regular-expressions-in-smtk/924 "2022-11-03T14:44:35Z")

</div>

Hi all! We are about to merge SMTK MR 2810, which allows SMTK to switch between std::regex and boost::regex (this will become more important as C++ is deprecating std::regex). Going forward, this means you should includ…

---

## [Can someone point me to an example of pulling vertices from faces obtained from AssociationDef?](https://discourse.kitware.com/t/can-someone-point-me-to-an-example-of-pulling-vertices-from-faces-obtained-from-associationdef/909)

<div class="topic-metadata">

**Author:** [@RHMoore](https://discourse.kitware.com/u/RHMoore)\
**Replies:** 4\
**Last updated:** [October 11, 2022, 6:57pm UTC](https://discourse.kitware.com/t/can-someone-point-me-to-an-example-of-pulling-vertices-from-faces-obtained-from-associationdef/909 "2022-10-11T18:57:54Z")

</div>

The ATS example is very powerful and allows me to pick faces that were marked elsewhere: \<AttDef Type="region.labeled.surface" Label="region: labeled set - face" BaseType="region.physical"\> \<AssociationsDef Number…

---

## [Change in badge behavior](https://discourse.kitware.com/t/change-in-badge-behavior/836)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 0\
**Last updated:** [May 16, 2022, 6:42pm UTC](https://discourse.kitware.com/t/change-in-badge-behavior/836 "2022-05-16T18:42:40Z")

</div>

The SMTK repository contains this change as of 2022-05-16; binaries released after this date will behave as described below. For users Previously when you clicked on a badge in the resource panel (see the image below fo…

---

## [Modeling question on prerequisites for association](https://discourse.kitware.com/t/modeling-question-on-prerequisites-for-association/556)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 5\
**Last updated:** [November 19, 2020, 6:12pm UTC](https://discourse.kitware.com/t/modeling-question-on-prerequisites-for-association/556 "2020-11-19T18:12:25Z")

</div>

Hi all but especially @Bob\_Obara and @johnt, I’m trying to model surface adhesion and sliding contact between anatomical organs for aeva. These contacts relate side sets on 2 organs (e.g., femur and ACL) to each other. …

---

## [Truchas shared-material properties UI](https://discourse.kitware.com/t/truchas-shared-material-properties-ui/318)

<div class="topic-metadata">

**Author:** [@johnt](https://discourse.kitware.com/u/johnt)\
**Replies:** 0\
**Last updated:** [September 12, 2019, 9:11pm UTC](https://discourse.kitware.com/t/truchas-shared-material-properties-ui/318 "2019-09-12T21:11:19Z")

</div>

Background We are implementing a custom view for Truchas materials, and still have one main requirement to address. The Truchas material attribute needs to support properties that can specified in either of two ways (i) …

---

## [Manually updating ComponentItem will not trigger UI update](https://discourse.kitware.com/t/manually-updating-componentitem-will-not-trigger-ui-update/306)

<div class="topic-metadata">

**Author:** [@Haocheng\_Liu](https://discourse.kitware.com/u/Haocheng_Liu)\
**Replies:** 0\
**Last updated:** [September 2, 2019, 3:41pm UTC](https://discourse.kitware.com/t/manually-updating-componentitem-will-not-trigger-ui-update/306 "2019-09-02T15:41:35Z")

</div>

Hi smtk developers, I got a question regarding the ComponentItem and its qt representation. My use case is that the input for my operator is an AssociationDef item and a ComponentItem. When user has selected something …

---

## [Feature Request: Resource panel display both model entity name and pedigree ids](https://discourse.kitware.com/t/feature-request-resource-panel-display-both-model-entity-name-and-pedigree-ids/236)

<div class="topic-metadata">

**Author:** [@johnt](https://discourse.kitware.com/u/johnt)\
**Replies:** 0\
**Last updated:** [March 11, 2019, 7:06pm UTC](https://discourse.kitware.com/t/feature-request-resource-panel-display-both-model-entity-name-and-pedigree-ids/236 "2019-03-11T19:06:38Z")

</div>

For Truchas, we explicitly changed sessions so that we could display model entity labels instead of pedigree ids in the resource panel. In practice, however, we have situations where we want both pieces of information, a…

---

## [Model resource clean after renaming entities?](https://discourse.kitware.com/t/model-resource-clean-after-renaming-entities/436)

<div class="topic-metadata">

**Author:** [@johnt](https://discourse.kitware.com/u/johnt)\
**Replies:** 2\
**Last updated:** [March 29, 2020, 8:41pm UTC](https://discourse.kitware.com/t/model-resource-clean-after-renaming-entities/436 "2020-03-29T20:41:03Z")

</div>

I observed that when I rename a model entity – by calling smtk;:model::EntityRef::setName() – the model resource’s clean flag does not get reset to the false state. (I can post a test to demonstrate.) Should that be chan…

---

## [Can I filter model entities by their association to an attribute type?](https://discourse.kitware.com/t/can-i-filter-model-entities-by-their-association-to-an-attribute-type/434)

<div class="topic-metadata">

**Author:** [@johnt](https://discourse.kitware.com/u/johnt)\
**Replies:** 1\
**Last updated:** [March 25, 2020, 9:21pm UTC](https://discourse.kitware.com/t/can-i-filter-model-entities-by-their-association-to-an-attribute-type/434 "2020-03-25T21:21:17Z")

</div>

I have a use case for the Truchas attribute template that I originally thought we could support, but now think we need an update to the smtk query syntax. The basic scenario is: The user creates one or more “enclosure”…

---

## [std::move and local variable address](https://discourse.kitware.com/t/std-move-and-local-variable-address/400)

<div class="topic-metadata">

**Author:** [@aron.helser](https://discourse.kitware.com/u/aron.helser)\
**Replies:** 2\
**Last updated:** [January 30, 2020, 3:03pm UTC](https://discourse.kitware.com/t/std-move-and-local-variable-address/400 "2020-01-30T15:03:24Z")

</div>

What is this warning trying to tell me? /home/aron.helser/projects/cmb/plugin-rgg-session/src/smtk/session/rgg/qt/rggNucAssembly.cxx: In member function ‘const smtk::model::EntityRef& rggNucAssembly::getAssyDuct() cons…

---

## [Linux segfault on modelbuilder exit](https://discourse.kitware.com/t/linux-segfault-on-modelbuilder-exit/383)

<div class="topic-metadata">

**Author:** [@johnt](https://discourse.kitware.com/u/johnt)\
**Replies:** 3\
**Last updated:** [January 15, 2020, 6:37pm UTC](https://discourse.kitware.com/t/linux-segfault-on-modelbuilder-exit/383 "2020-01-15T18:37:11Z")

</div>

I have an ongoing problem with linux builds on the master branch. It has been there awhile, and I kept thinking it would go away as the branch matured, but that is not the case. I will paste an example stack trace below,…

---

## [Issue with client-server wrapper and cmake](https://discourse.kitware.com/t/issue-with-client-server-wrapper-and-cmake/368)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 3\
**Last updated:** [December 30, 2019, 4:10pm UTC](https://discourse.kitware.com/t/issue-with-client-server-wrapper-and-cmake/368 "2019-12-30T16:10:04Z")

</div>

@ben.boeckel @tj.corona I’m having an issue adding a Registrar class to smtk/extension/vtk/source… when CMake runs, it complains: -- Configuring done CMake Error at /stage/build/cmb/superbuild/superbuild/paraview/build…

---

## [Add the plugin version checks](https://discourse.kitware.com/t/add-the-plugin-version-checks/345)

<div class="topic-metadata">

**Author:** [@Haocheng\_Liu](https://discourse.kitware.com/u/Haocheng_Liu)\
**Replies:** 6\
**Last updated:** [November 14, 2019, 11:49pm UTC](https://discourse.kitware.com/t/add-the-plugin-version-checks/345 "2019-11-14T23:49:28Z")

</div>

Recently when developing smtk plugins, I spent hours to debug a mysterious bug and it turns out that it’s just because my custom plugin is linking against smtk 3.3.0, but my CMB is linking again 3.2.0. Thus the new featu…

---

## [Importing a model into an existing resource](https://discourse.kitware.com/t/importing-a-model-into-an-existing-resource/170)

<div class="topic-metadata">

**Author:** [@tj.corona](https://discourse.kitware.com/u/tj.corona)\
**Replies:** 5\
**Last updated:** [November 22, 2018, 8:40pm UTC](https://discourse.kitware.com/t/importing-a-model-into-an-existing-resource/170 "2018-11-22T20:40:34Z")

</div>

@chart3388 In response to the issue you were having with importing a model into an existing resource, this MR contains updates to the rendering code that should hopefully fix 1/2 of your problem. The resource panel will …

---

## [SMTK - fatal error: moab/EntityHandle.hpp](https://discourse.kitware.com/t/smtk-fatal-error-moab-entityhandle-hpp/147)

<div class="topic-metadata">

**Author:** [@chart3388](https://discourse.kitware.com/u/chart3388)\
**Replies:** 4\
**Last updated:** [October 4, 2018, 5:13pm UTC](https://discourse.kitware.com/t/smtk-fatal-error-moab-entityhandle-hpp/147 "2018-10-04T17:13:04Z")

</div>

Been having this issue for a while with building SMTK against MOAB. We are using MOAB 4.9.0 /opt/dev/cmb-6.0.0-9d95e0c07b6802176294760e36a4ec53043f70a4/thirdparty/smtk/smtk/mesh/moab/HandleRange.h:20:33: fatal error: m…

---

## [SMTK - Model not rendering - Could not toggle visibility](https://discourse.kitware.com/t/smtk-model-not-rendering-could-not-toggle-visibility/148)

<div class="topic-metadata">

**Author:** [@chart3388](https://discourse.kitware.com/u/chart3388)\
**Replies:** 6\
**Last updated:** [September 11, 2018, 6:20pm UTC](https://discourse.kitware.com/t/smtk-model-not-rendering-could-not-toggle-visibility/148 "2018-09-11T18:20:09Z")

</div>

Hi All, Built CMB 6 off of this commit and SMTK off this commit and I am able to get the operations now to show up in the resource panel. But when I use an operation, like smtk::bridge::discrete::ImportOperation via th…

---

## [Communication between plugins](https://discourse.kitware.com/t/communication-between-plugins/150)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 1\
**Last updated:** [August 30, 2018, 12:29pm UTC](https://discourse.kitware.com/t/communication-between-plugins/150 "2018-08-30T12:29:29Z")

</div>

@chart3388 When we talked, one of the questions that came up was how plugins might communicate with each other. ParaView exposes a method for this on the client (not server) side inside Qt/Core/pqApplicationCore.h… plug…

---

## [ParaView error "Could not locate server on which the source is being added."](https://discourse.kitware.com/t/paraview-error-could-not-locate-server-on-which-the-source-is-being-added/110)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 7\
**Last updated:** [May 25, 2018, 2:03pm UTC](https://discourse.kitware.com/t/paraview-error-could-not-locate-server-on-which-the-source-is-being-added/110 "2018-05-25T14:03:52Z")

</div>

@Haocheng\_Liu I did eventually find the exact error I ran into with modelbuilder 6; in my case, modelbuilder would start but when the pqBehavior instance was requested or when a reader was created (I can’t recall which),…

---

## [Extending the auxiliary geometry extension](https://discourse.kitware.com/t/extending-the-auxiliary-geometry-extension/100)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 1\
**Last updated:** [May 5, 2018, 3:27am UTC](https://discourse.kitware.com/t/extending-the-auxiliary-geometry-extension/100 "2018-05-05T03:27:02Z")

</div>

@Haocheng\_Liu I see at least part of the problem you have with the RGG session. It needs not only to indicate that the .rgg file can be loaded but also to add it to the VTK cache. Since it adds dependencies beyond VTK, i…

---

## [Delaunay extension](https://discourse.kitware.com/t/delaunay-extension/88)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 6\
**Last updated:** [April 16, 2018, 3:24pm UTC](https://discourse.kitware.com/t/delaunay-extension/88 "2018-04-16T15:24:34Z")

</div>

@tj.corona Shouldn’t there be an “environment” library for smtkDelaunayExt? I don’t see one and the tests appear to manually register the operator to an operation manager.

---

## [Operator group registration](https://discourse.kitware.com/t/operator-group-registration/90)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 4\
**Last updated:** [April 16, 2018, 12:54pm UTC](https://discourse.kitware.com/t/operator-group-registration/90 "2018-04-16T12:54:05Z")

</div>

While working to get a list of available operators from the selection, I’ve run across a curious issue in smtk/bridge/polygon/RegisterSession.cxx at line 61: https://gitlab.kitware.com/cmb/smtk/blob/master/smtk/bridge/p…

---

## [from\_json() for attribute items](https://discourse.kitware.com/t/from-json-for-attribute-items/77)

<div class="topic-metadata">

**Author:** [@dcthomp](https://discourse.kitware.com/u/dcthomp)\
**Replies:** 3\
**Last updated:** [April 11, 2018, 3:07am UTC](https://discourse.kitware.com/t/from-json-for-attribute-items/77 "2018-04-11T03:07:02Z")

</div>

@Haocheng\_Liu I’m writing from\_json() and to\_json() methods for a new subclass of smtk::attribute::Item (ReferenceItem which holds references to smtk::resource::PersistentObject) and want to understand why the signature…
