# Propagate change of tmap in a IDetailCustomization

**URL:** <https://forums.unrealengine.com/t/propagate-change-of-tmap-in-a-idetailcustomization/394243>\
**Category:** C++\
**Tags:** cdo, tmap, unreal-engine, question\
**Created:** [May 22, 2017, 10:16am UTC](https://forums.unrealengine.com/t/propagate-change-of-tmap-in-a-idetailcustomization/394243 "2017-05-22T10:16:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cedric\_Schaff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cedric\_Schaff](https://forums.unrealengine.com/u/Cedric_Schaff)\
**Post date:** [May 22, 2017, 10:16am UTC](https://forums.unrealengine.com/t/propagate-change-of-tmap-in-a-idetailcustomization/394243/1 "2017-05-22T10:16:35Z")

</div>

In a DetailCustomization, i have a TMap

I would like to programmatically propagate change of a property of the struct of the edited CDO to every instances (the one in viewport in particular).  
So far i tried PostEditChangeChainProperty and NotifyPostChange (on the TMap property handle) but without any success.

I présume i should get a IPropertyHandle of the struct property and use Setvalue. But the property is a FGuid, and i can’t use setvalue.

Could anyone show me the direction ?

---

<div class="post-metadata">

**Author:** ![Cedric\_Schaff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cedric\_Schaff](https://forums.unrealengine.com/u/Cedric_Schaff)\
**Post date:** [May 22, 2017, 1:09pm UTC](https://forums.unrealengine.com/t/propagate-change-of-tmap-in-a-idetailcustomization/394243/2 "2017-05-22T13:09:35Z")

</div>

Find a solution: propagate to all archetype instances. Need to press compile to see the result in viewport and level. It works, but i have a doubt as to its correctness.

```
TRACESTATIC("Remove weapon for %s", *HPName.ToString());

Ship->FixedHardPointsFromLibrary[HPName].WeaponId = FGuid(); // remplace par un guid invalide (0)

Ship->MarkPackageDirty();

TRACESTATIC("istemplate %i", (int32)Ship->IsTemplate());
if (Ship->IsTemplate())
{
    TArray<UObject*> ArchetypeInstances;
    Ship->GetArchetypeInstances(ArchetypeInstances);
    for (int32 InstanceIndex = 0; InstanceIndex < ArchetypeInstances.Num(); ++InstanceIndex)
   {
		ABaseShip* Instance = Cast<ABaseShip>(ArchetypeInstances[InstanceIndex]);
		if (!Instance)
		{
			TRACEWSTATIC("Instance not valid !!");
		}
		Instance->FixedHardPointsFromLibrary[HPName].WeaponId = FGuid();
		Instance->MarkPackageDirty();
	}
}
```
