question

João Victor SDA avatar image
0 Likes"
João Victor SDA asked João Victor SDA commented

FlexSimPy error in FlexSim 22.2.3: "lc_flexinit failed: 1".

Hi,


It is a question correlated to the previous question: https://answers.flexsim.com/questions/127403/flexsimpy-error-lc-flexinit-failed-1.html

Following the procedure to create a new module node into the FlexSim tree (https://docs.flexsim.com/en/22.0/Reference/DeveloperAdvancedUser/ModuleSDK/QuickStart/QuickStart.html ), the 'lc_flexinit: 1' error doesn't occur anymore in FlexSim 22.1.


However, this error persists when I use FlexSim 22.2.3 update, even doing the same procedure.


This error occurs when I pass the argument 'evaluateLicense = False' to controller Launch.

Obs: It's essential for me to the 'evaluateLicense = False' because if 'true' FlexSim doesn't do replications.


Thanks.

FlexSim 22.2.3
flexsimpy
· 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.

Kavika F avatar image
2 Likes"
Kavika F answered João Victor SDA commented

Hey @João Victor SDA, I was able to replicate your error. After debugging, I was able to find a workaround for your problem. In your module development directory, go into the "program" directory, and find the "flexsim_libFNP.dll".

1671036085314.png

Copy that file and paste it into the directory where your python.exe is located. It could either be in your C:/ drive or your appdata directory (like %APPDATA%\Local\Programs\Python).

1671036413679.png

Then try running your script. Let me know if this fixes your problem.


1671036085314.png (35.5 KiB)
1671036413679.png (3.7 KiB)
· 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.

Phil BoBo avatar image
0 Likes"
Phil BoBo answered João Victor SDA commented

In order to run FlexSim with the argument 'evaluateLicense = False', the following conditions must be true:

  • The Flexnet Licensing Service must be installed. This is done by either installing FlexSim via its installer or by running the FlexSim executable as an administrator once.
  • You cannot be attached to the process. If a debugger is attached during FlexSim's license check, then the application will crash. You cannot run FlexSim in debug mode if you are trying to run it using a license. You can attach to the process after the license check, but you cannot have a debugger attached during the license check. The "evaluateLicense" parameter causes the program to run without checking for or receiving a license so that you can debug startup connectivity issues. Once your code is connecting and running appropriately and you want to then run it with a license, then you can no longer debug the startup process. The licensing code cannot be run with a debugger attached.
· 2
5 |100000

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