# How to createFeature "Text"

**URL:** <https://forum.visualcomponents.com/t/how-to-createfeature-text/925>\
**Category:** Component Modeling\
**Created:** [January 7, 2020, 9:19am UTC](https://forum.visualcomponents.com/t/how-to-createfeature-text/925 "2020-01-07T09:19:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwn\_h](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/w/22d042/32.png) [@wwn\_h](https://forum.visualcomponents.com/u/wwn_h)\
**Post date:** [January 7, 2020, 9:19am UTC](https://forum.visualcomponents.com/t/how-to-createfeature-text/925/1 "2020-01-07T09:19:48Z")

</div>

I want to know how to create “Text” feature with Python Script?

![](https://vc-forum-files.s3-eu-west-1.amazonaws.com/uploads/hm_bbpui/19995/oua8or0prdyn66bfo4du5dfpwbveadhe.png)

---

<div class="post-metadata">

**Author:** ![WilliamSmith](https://forum.visualcomponents.com/user_avatar/forum.visualcomponents.com/williamsmith/32/5471_2.png) [@WilliamSmith](https://forum.visualcomponents.com/u/WilliamSmith)\
**Post date:** [January 7, 2020, 9:52am UTC](https://forum.visualcomponents.com/t/how-to-createfeature-text/925/2 "2020-01-07T09:52:46Z")

</div>

Here is snippet on how to make Text feature and define its Text property.

```
from vcScript import *

app = getApplication()
comp = getComponent()
node = comp
text_feat = node.getFeature("Example")
if not text_feat:
  text_feat = node.RootFeature.createFeature(VC_TEXT, "Example")

text_feat.Text = "\"Howdy, partner! 2+2=4\""
text_feat.Size = 100.0
node.rebuild()
app.render()
```

Notice that I had to use a string quote with escape characters to pass a string since Text is expecting an expression given in the form of a string.

Text feature is of type vcFeature, and it has these properties:

- Name
- Visible
- Material
- Text
- Size
- IsFloating
- IsReadOnly

---

<div class="post-metadata">

**Author:** ![wwn\_h](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/w/22d042/32.png) [@wwn\_h](https://forum.visualcomponents.com/u/wwn_h)\
**Post date:** [January 8, 2020, 10:54am UTC](https://forum.visualcomponents.com/t/how-to-createfeature-text/925/3 "2020-01-08T10:54:01Z")

</div>

OK,thank you very much!

The reason I asked this question was because that the “VC\_TEXT” constant was not found in the Python API.
