0
votes

In eclipse we can import the elements of a jar file to palette and use them in designing GUI. I was wondering if we can do the same thing in AnyLogic?

I have added a java library (JCalendar for example) to the dependencies of my model. I tried to add it as a library object class using the "Manage Libraries" option in the palette view. When I add the Jar file it gives me this error:

Error while opening the library: Invalid library format. Library description is missing.

Is there a way to fix this error? If not, how can I use the external library elements in my model? How to know which element of the controls palette to use to pick up the data?

1

1 Answers

0
votes

AnyLogic libraries can only be libraries you created with AnyLogic.

In your case, create a new model and empty agent class. Drag a JCalendar instance into the new agent class.

Then, you can turn it into an AnyLogic library as below: enter image description here

In your real models, you can now add the library through "manage libraries" and drag and drop your object.

Do check the help on this as well, you can do some neat tricks with your own libraries.