# How can i get the properties of instance in Foliage?

**URL:** <https://forums.unrealengine.com/t/how-can-i-get-the-properties-of-instance-in-foliage/336091>\
**Category:** World Creation\
**Tags:** unreal-engine, Foliage, question\
**Created:** [October 22, 2015, 6:29am UTC](https://forums.unrealengine.com/t/how-can-i-get-the-properties-of-instance-in-foliage/336091 "2015-10-22T06:29:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![junsa9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@junsa9](https://forums.unrealengine.com/u/junsa9)\
**Post date:** [October 22, 2015, 6:29am UTC](https://forums.unrealengine.com/t/how-can-i-get-the-properties-of-instance-in-foliage/336091/1 "2015-10-22T06:29:16Z")

</div>

I want get location of the instance member in Foliage.  
This is what I selected foliage in viewport and launch my function then return the instance’s location.

## this is my code:

```
AActor* TargetActor = NULL;
AInstancedFoliageActor*	CurrentIFA = NULL;

FString TargetName;
FString TargetLocation;

for (FSelectionIterator It(*GEditor->GetSelectedActors()); It; ++It)
{
	TargetActor = static_cast<AActor*>(*It);
	//CurrentIFA = static_cast<AInstancedFoliageActor*>(*It);
	//CurrentIFA = (AInstancedFoliageActor*)TargetActor;
	//CurrentIFA = Cast<AInstancedFoliageActor*>(*It);
	
	if (TargetActor)
	{
		TargetName = TargetActor->GetName();
		TargetLocation = TargetActor->GetActorLocation().ToString();

		UE_LOG(ToolButtonModuleLog, Warning, TEXT("Name: %s, Location: %s"), *(TargetName), *(TargetLocation));
	}
}

```

* * *

This code is only can get the Actor’s properties.  
I was selected a Foliage launch my code then return \<0, 0, 0\> location. just one location.  
I want each of the instance properties inside Foliage.

How can i get this.?  
I was search in internet so many times but i can’t anymore.  
help me plz.

---

<div class="post-metadata">

**Author:** ![KaiZeroll](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KaiZeroll](https://forums.unrealengine.com/u/KaiZeroll)\
**Post date:** [March 11, 2019, 1:28pm UTC](https://forums.unrealengine.com/t/how-can-i-get-the-properties-of-instance-in-foliage/336091/2 "2019-03-11T13:28:27Z")

</div>

I’ve been looking for an answer on this as well, there is nothing!
