newmodelinstall - Global List

newmodelinstall - Global List

hong_seongweon
Enthusiast Enthusiast
446 Views
5 Replies
Message 1 of 6

newmodelinstall - Global List

hong_seongweon
Enthusiast
Enthusiast

In the ‘Operator1 Process’ object, List references of 'List' Asset is the global list 'ItemList1'.
However after opening the User Library it changes to Use Internal List.

 

I created an 'OnCreate' node on the 'ItemList1' object in the user library so that 'List' Asset would reference 'ItemList1', but 'OnCreate' does not execute.

 

I know how to make the 'List' Asset reference 'ItemList1' when dragging ‘Operator1 Process’ again into the Model.

 

I want to place the 'ItemList1' object in the 'newmodelinstall' node and need to know how to maintain the 'List' Asset's reference to the 'ItemList1' object after opening the User Library.

 

hong_seongweon_0-1758003936224.png

 

hong_seongweon_1-1758003947086.png

 

hong_seongweon_2-1758003954003.png

 

Accepted solutions (1)
447 Views
5 Replies
Replies (5)
Message 2 of 6

joerg_vogel_HsH
Mentor
Mentor

You need to create first a node of a global list, that you can reference for. If  you want to do this by a library object, you must have a static global list in your library tree that you change in adding process to your actual present global list. Or you create a global list. Create a global list dynamically can be difficult, if it involves a reset step. 

0 Likes
Message 3 of 6

hong_seongweon
Enthusiast
Enthusiast

Thank you for your response.
However, I did not understand the content. (static global list in library tree, change in adding process)
Could you show me how it's implemented in the library file?

0 Likes
Message 4 of 6

joerg_vogel_HsH
Mentor
Mentor

You have put a process flow into a user library. You can add a global list additionally into this user library. All needed references should you have in this user library. Then you can save this user library. Please check if you have still a reference of list resource activity to the right global list. Check this in the tree. 

0 Likes
Message 5 of 6

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

I see now, that a dropscript nor a user library trigger can set a reference in a Resource List activity.

Workaround: You insert a 3D object, that will execute a code in its OnReset trigger. This Object gets automatically inserted by node "newmodelinstall". In this library file I install a global list and a process flow called "ProcessFlowLib" automatically, too.

treenode pfList = getactivity("ProcessFlowLib", "List");
treenode pfListRef = pfList.find(">/variables/listRef");
if (pfListRef.value != List("ItemList1").as(treenode))
	pfListRef.value = List("ItemList1").as(treenode);

 extract file to get a user library file.

0 Likes
Message 6 of 6

hong_seongweon
Enthusiast
Enthusiast

Thank you so much for your kind and detailed answer.

0 Likes