Notifications
Clear all

[Closed] Storing an array into an object's properties

I am trying for find a way of storing an array into an object’s properties. I tried both setUserProp & setAppData, however those require the array to be converted into a string. For short arrays that is not a problem, however if the array gets large, converting it to a string adds a “…” at the end, which makes it unexecutable when I recall it. Is there any better way of storing a value into an object’s properties without it being a string, or at least without having the string being cut short?

Example:

The_Array = #()
for obj in selection do append The_Array obj.name -- object count is large
setappdata $Box_01 -1111100  (The_Array as string)
print (The_Array as string) -- prints "#(Box1, ........, Box23, Box24, ...)"
execute (getAppData curr_cam -1111100) -- produces an error
2 Replies
1 Reply
(@denist)
Joined: 10 months ago

Posts: 0

use context ‘with printallelements ON’. see the MXS help PrintAllElements Variable and Context

you can save it using custAttributes
there’s plenty of examples on this forum