# Getting INote text from an ISimComponent

**URL:** <https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931>\
**Category:** .Net Add-on Programming\
**Created:** [May 9, 2023, 9:26am UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931 "2023-05-09T09:26:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RapidGeek](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/r/87869e/32.png) [@RapidGeek](https://forum.visualcomponents.com/u/RapidGeek)\
**Post date:** [May 9, 2023, 9:26am UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931/1 "2023-05-09T09:26:45Z")

</div>

I am trying to make a text updater/replacer for the notes in components. We have a lot of similar modules, but they are currently updated by hand, 80-120 components with 4-76 text updates. So it is a lot of manual work. Any ideas are welcome. I have the IApplication, ISimWorld, and ISimComponents List to work with, but I am not sure how to check for the Note being attached to the component.

---

<div class="post-metadata">

**Author:** ![Este](https://forum.visualcomponents.com/user_avatar/forum.visualcomponents.com/este/32/760_2.png) [@Este](https://forum.visualcomponents.com/u/Este)\
**Post date:** [May 9, 2023, 9:46am UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931/2 "2023-05-09T09:46:31Z")

</div>

I think you could loop through all _ISimComponent_ and check the _Behaviours_ if there are any behaviors with _Type_ _Note_.  
This should give you a list of all the notes in all your components. Then you can access the _Note_ property of the INote behavior, and update the text as a string.

---

<div class="post-metadata">

**Author:** ![RapidGeek](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/r/87869e/32.png) [@RapidGeek](https://forum.visualcomponents.com/u/RapidGeek)\
**Post date:** [May 9, 2023, 7:27pm UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931/3 "2023-05-09T19:27:58Z")

</div>

Thanks for the reply. I will try this out hopefully today or tomorrow. 😃

---

<div class="post-metadata">

**Author:** ![RapidGeek](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/r/87869e/32.png) [@RapidGeek](https://forum.visualcomponents.com/u/RapidGeek)\
**Post date:** [May 15, 2023, 5:56am UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931/4 "2023-05-15T05:56:20Z")

</div>

Hi,

I think it is working to change a component, but I am now stuck placing that component in the Components (ReadOnlyCollection) of the world (ISimWorld). Do you know how to perform this step?

---

<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:** [May 15, 2023, 8:34am UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931/5 "2023-05-15T08:34:58Z")

</div>

If the component is not in that collection, try getting the root node of the component then use ISimNode.AttachTo() to attach that node to ISimWorld world node. But the Sim World should know all components in the world, so not sure is why the component would not be in that list.

---

<div class="post-metadata">

**Author:** ![RapidGeek](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/r/87869e/32.png) [@RapidGeek](https://forum.visualcomponents.com/u/RapidGeek)\
**Post date:** [May 18, 2023, 7:45pm UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931/6 "2023-05-18T19:45:19Z")

</div>

My understanding is that the Components (ReadOnlyCollection) is not modifiable and therefore I would not be able to perform updates to the INote Behavior within that list. So my plan was to create a duplicate list which I will modify and then replace the Components Collection with the updates.

---

<div class="post-metadata">

**Author:** ![idkfa](https://forum.visualcomponents.com/user_avatar/forum.visualcomponents.com/idkfa/32/5568_2.png) [@idkfa](https://forum.visualcomponents.com/u/idkfa)\
**Post date:** [May 19, 2023, 3:28am UTC](https://forum.visualcomponents.com/t/getting-inote-text-from-an-isimcomponent/4931/7 "2023-05-19T03:28:20Z")

</div>

Component list is read only, but the component isn’t, you can access the component to overwrite INote.
