Use Properties of Imported Object/Class from Activity

I have created a Custom Activity in UiPath that takes in some information with the intention of returning an object that contains the submitted strings as properties.

For example, here is an example of the object I create within the script (Top Left)

Here the script returns the created “car” object (Top Right)

And here is me creating the object using the activity, but the following print line wont allow me to access the properties I created within the activity (Bottom)

So ultimately, what do I need to do in order to make this a valid, recognized object within UiPath and allow me to use those created properties in my project?

HI,

Can you share what error do you have?

Or, for now, can you try to re-open the project (close Studio and re-launch Studio)? Recovery function may run.

Regards,

Here is the error I am getting:

Hi,

I guess car_object is set as object type.
Can you try to set it as Car type in variables ( or arguments) panel?

Regards,

Hi @phaynes

Try giving the below syntax

car_object.carMake

Regards

I didn’t realize UiPath had imported my class in and I needed to explicitly type it as such, setting the output of my activity to object type of “Car” did it, thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.