How to spawn object while looping through all elements of a datatable?

I’m following a solution in this question for looping through row in a data table Is there a better way to loop through all elements of a datatable? - Programming & Scripting - Epic Developer Community Forums. It works perfectly.

My question would be how do i set it so that instead of printing the row name, it will spawn an actor/object for each row found?

Hi ,

I assume you want the data table to define what kind of actor to spawn. I would include the class name of the object you’d like to spawn in your data table (as type Actor Class Reference). Then that would appear in your Break Row node the same as Age/Gender/Job/Meshes in the screenshot you attached. You can plug that into a Spawn Actor from Class node and it will create the Actor from the Class Reference in your table.

Hi rmcmurra,
Thanks for the answer, but that’s not quite what I’m after.
I want it to spawn an actor for each row in a particular column.
For instance if in the column ‘job’ there are 10 rows, then it will spawn 10 actor

With the Spawn Actor from Class node.

@, I tried following the link you posted and it says the page doesn’t exist- I’m having a hard time finding a response to this- I know this is an old post, but do you remember how you did it, or can you perhaps point me in the right direction? I’m hoping to do a 3D scatterplot using UE4 where each row contains x/y/z coordinates and a string label for each data point, but considering I have thousands of points, I don’t want to do that manually. Thanks for your help!

Hey jzylinsk, I don’t have the source file for the project anymore but still have the screenshot of this. I think I used for loop in this. Please see the image below

@jzylinsk I hate to hijack an old thread, but I am trying to do something that is extremely similar to the question that you asked. Were you ever able to accomplish what you mentioned in the above message?