question

Raul Vazquez avatar image
0 Likes"
Raul Vazquez asked Raul Vazquez commented

Shape is lost in custom library

Hello team,

Could you help me please?, I want to do a custom library in order to share with one internal partner, but once he import the library he lost he 3Dshape... he use is own computer but in mine I can see it.

Do you have any best practice to do it? what do you recommended?

Thanks a lot

modellostcustomlibrary.jpgsmt-completedlibrary.fsl

FlexSim 19.2.3
librarylibrary best practice
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Phil BoBo avatar image
1 Like"
Phil BoBo answered Raul Vazquez commented
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Raul Vazquez avatar image Raul Vazquez commented ·

Hello @phil.bobo , thanks for answer...

I have some doubts.

*I cant see the "User Library View" , where could i find it?

*Do you have an example of scripting that? or which part do I need to modify?

*In case that you dont have it, where I can take a look for some some literature to be more familiar with this topic?

Thx a lot for your kindness and support

testcustomlibrary-autosave.fsm

library-view.jpg

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Raul Vazquez commented ·

Press the Main button in the Tree Navigation window to see the user library tree:

The documentation for creating custom libraries is in the user manual: Custom Libraries

You can call the createcopy() command to copy the packedmedia nodes from the user library to the model. See the attached example user library (shape-library.fsl).

// assert that the model has a packedmedia attribute
treenode modelPackedMedia = assertattribute(model(), "packedmedia", DATATYPE_NUMBER);
set(modelPackedMedia, 1);

// copy each packed media node from the user library to the model
for (int r = 1; r <= content(packedmedia(userLibrary)); r++) {
	createcopy(rank(packedmedia(userLibrary), r), modelPackedMedia, 1);
}
1 Like 1 ·
shape-library.fsl (5.4 KiB)
main-tree.png (53.3 KiB)
Raul Vazquez avatar image Raul Vazquez Phil BoBo ♦♦ commented ·

Thanks a lot for your help,

0 Likes 0 ·
Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered Raul Vazquez commented

Hi @Raul Vazquez,

I am thinking that your partner does not have the 3d shape downloaded onto their computer. Have him/her save the 3d object under "C:\Program Files (x86)\FlexSim 2019 Update 2\fs3d\[some folder name]". Then, in your model tree, have "UserLibrary 1\[some object]\visual\shape" point to the place where you saved the 3d object.

Let me know if this helps, if not I will take another look at it.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Raul Vazquez avatar image Raul Vazquez commented ·

Thanks for the information @Benjamin W2 , Im looking something that the "receiver" does not have the need to have the 3D shapes in his computer...But I appreciate your answers

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.