APEX Script get type

   411   1   1
User Avatar
Member
25 posts
Joined: Nov. 2018
Offline
Is there a way to get the type of a value in APEX Script? I tried the following python:

my_value: Int = 0
type = type(my_value)
print(type)

and got the following error:

``type = type(my_value)``
The given function Type has no input at index -1).

is there no way to get the type of a value in APEX Script? I'm trying to dynamically add value nodes to my network by iterating over a dictionary and i need to know the types of each value, so i can create the callback string used in addNode, i.e. "Value<Int>".
Edited by playBlaster - May 31, 2025 20:35:25
User Avatar
Member
8017 posts
Joined: July 2005
Online
One way to do this:
d:Dict = BindInput()
t = ""
dummy0, success = d.get_Float('a')
if success:
    t = "Float"
dummy1, success = d.get_Int('a')
if success:
    t = "Int"
print(f'{t=}')
BindOutput(t)

Attachments:
apexDictGet.hip (128.2 KB)

  • Quick Links