# system.tag.writeBlocking vs system.tag.configure

**URL:** <https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [March 22, 2023, 8:14pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462 "2023-03-22T20:14:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregCavazos](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@GregCavazos](https://forum.inductiveautomation.com/u/GregCavazos)\
**Post date:** [March 22, 2023, 8:14pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462/1 "2023-03-22T20:14:43Z")

</div>

I have the need to modify tag properties via scripting (override UDT definition), I have noticed that I can do it 2 different ways, one with system.tag.writeblocking and also with system.tag.configure.

For example, I want to change a tag to be expresion type and set the expression, I can use any of the options below.

**system.tag.configure**

```python
tag = {
            "name": "Valve_Open_DI",           
            "valueSource": "expr",
			"expression": "{[.]Close_Valve_DO}"
        }
 
system.tag.configure("[default]TestValve", [tag], "o")

```

**system.tag.writeblocking**

```python
system.tag.writeBlocking("[default]TestValve/Valve_Open_DI.valueSource", "expr")
system.tag.writeBlocking("[default]TestValve/Valve_Open_DI.expression", "{[.]Close_Valve_DO}")

```

Is there any advantage or disadvantage between them?

Would the answer be different if I apply this to the UDT itself ("[default]_types_/SomeUDT")

Thanks in advance!  
Greg

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 22, 2023, 8:21pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462/2 "2023-03-22T20:21:51Z")

</div>

As a rule of thumb:

- If you have one property to change, just use a write.
- If you have more than one property (or tag!) to change, and/or you want "atomicity" of your configuration change, use configure.

Ultimately, it goes through basically the same mechanism; the write will create a configuration change and apply it using the same mechanism. But it's a bit easier to set up (I would argue) a write for a simple property change, if you know for a fact it's going to be an overwrite and there's no need for the extra functionality configure gives you.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [May 2, 2024, 9:06am UTC](https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462/3 "2024-05-02T09:06:30Z")

</div>

@PGriffith,  
I try to override the **documentation** prop of a tag.  
I can't use **tag.writeBlocking** because my tag is **ReadOnly** , so tag's builtin props can't be modified with tag.writeBlocking.

My tag has multiple prop overrided.

The following script works well.  
It override only the documentation property.

```python
path = "[default]path/to/folder"
collisionPolicy = "m"
tags = [{"name" : "MY_TAG", "documentation" : "new doc"}]
print system.tag.configure(path, tags,collisionPolicy)

```

But I want to remove the override for only the doc property.  
I've tried the following script

```python
path = "[default]path/to/folder"
collisionPolicy = "m"
tags = [{"name" : "MY_TAG", "documentation" : None}]
print system.tag.configure(path, tags,collisionPolicy)

```

but it doesn't works

if I use:

```python
path = "[default]path/to/folder"
collisionPolicy = "o"
tags = [{"name" : "MY_TAG"}]
print system.tag.configure(path, tags,collisionPolicy)

```

All overrided prop are removed.

I would like to obtain the same action by script when I click on the green ball to remove the change for the documentation

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/93b6181f1e1bc9206054067a5f5120fccee0af46.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 2, 2024, 9:38am UTC](https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462/4 "2024-05-02T09:38:54Z")

</div>

Use `system.tag.getConfiguration`, remove the unwanted prop, then feed the results into `system.tag.configure`.

I didn't try, but I'd expect it to do what you need.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [May 2, 2024, 10:05am UTC](https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462/5 "2024-05-02T10:05:45Z")

</div>

It doesn't works, It will put some overrides on all properties...

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 2, 2024, 10:44am UTC](https://forum.inductiveautomation.com/t/system-tag-writeblocking-vs-system-tag-configure/71462/6 "2024-05-02T10:44:58Z")

</div>

> [@Ignition Extensions - Convenience utilities for advanced users](https://forum.inductiveautomation.com/t/ignition-extensions-convenience-utilities-for-advanced-users/64615):
>
> Introducing a hopefully community-engaged effort to build a useful repository of scripting and other Ignition utilities for everyone to benefit from. Download the latest release from the [Releases](https://github.com/IgnitionModuleDevelopmentCommunity/ignition-extensions/releases) page and take advantage of the following functions: Scripting Functions system.util system.util.getContext(): Context A convenience function to retrieve the local "context" object, useful as an entrypoint to other advanced scripting. system.util.deepCopy(object): Object Converts a given Pyth…

That's what getLocalConfiguration was meant for
