Creation of custom modules in FS 17.1.2

Creation of custom modules in FS 17.1.2

MBJEBZSRG
Advocate Advocate
17 Views
8 Replies
Message 1 of 9

Creation of custom modules in FS 17.1.2

MBJEBZSRG
Advocate
Advocate

[ FlexSim 17.1.2 ]

Hi,

I have been looking at a video from one of the distributer trainings about the creation of custom Flexsim modules in the Flexsim tree rather than making my own C++ dlls. Unfortunately I cant seem to get it to work. When I run the applicationcommand("savedefaultviewproject"); it asks me if I want to save the view and collapse and close all trees, but it doesn't create those two essential files in my modules folder that I expected and my new module does not show up in the modules menu on right click.

I will reiterate the steps I have taken and perhaps you can tell me where I went wrong:

1 I reinstalled Flexsim 17.1.2 to a custom location to have total read and write access.

2 I added an empty 'NewModule' folder to the 'modules' folder of the new installation.

3 I then opened Flexsim and in the 'View/environment' tree I created the dev =1 node and successfully activated dev mode.

4 I then added a the new subnode 'NewModule' to the 'View/modules' tree where the other installed modules are listed. Into the 'NewModule' node I added another subnode called 'Installdata'.

5 I now ran the applicationcommand("savedefaultviewproject"); and selected 'yes' to the two popups that asked me if I want to save the view project and collapse all trees and views. Flexsim then worked for a few seconds and returned to normal.

6 I checked the 'NewModule' folder under the installation to see of the two module files had been created, but it was still empty, and when I right click a node and go to the modules menu selection I can only see the installed modules and not my 'NewModule'.

Does this approach still work in Flexsim 17.1.2, and if so can you spot what I have been doing wrong?

0 Likes
Accepted solutions (1)
18 Views
8 Replies
Replies (8)
Message 2 of 9

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

You need to do step 4 in the main tree, not the view tree.

Have you taken a look at our ModuleSDK? You'll find a bunch of resources, documentation, and examples to help you develop a module.

Take a look at the QuickStart.html and ModuleDevelopment.html files in the Documentation folder.



Matthew Gillespie
FlexSim Software Developer

Message 3 of 9

MBJEBZSRG
Advocate
Advocate

I have now tried following the ModuleSDK, but I didn't get any further.

I created the needed nodes in the main tree instead, but now when I 'savedefaultviewproject' I get the following error and Flexsim locks up:

exception: Exception caught in globalcommand_savebyname()
exception: FlexScript exception: VIEW:/standardviews/savedefaultviewproject

Also Next time I open my development version of Flexsim this error pops up.

6676-moduleerror.png

Fortunately its only the development copy that appears to be broken.

0 Likes
Message 4 of 9

matt_long
Not applicable

Is your FlexSim directory in a place where you have write permissions? If you have it installed in the Programs directory you'll need to move (or create a copy) it into somewhere like your Documents directory.

0 Likes
Message 5 of 9

MBJEBZSRG
Advocate
Advocate

No, I followed the guide in the moduleSDK to the letter including making a copy of my Flexsim installation to a place where I have write permissions. Its is my Dev-Version, and as mentioned the error at startup only affects my Dev-version. Copying Flexsim again and overrwiting the the Dev-Version solves this and lets me start fresh.

0 Likes
Message 6 of 9

MBJEBZSRG
Advocate
Advocate

Ok I have done a bunch more testing on this topic:

If I use a copy of a Flexsim 17.0.3 or 17.1.2 for my Dev_Version the module creation fails - not in the same way but it fails. But using a copy of Flexsim 16.2.2 I managed to create a new module and the recuired *d.fsx and *.t files were created in the module folder.

I have now copied my new module into my Flexsim 17.1.2 Dev_Version and it works! But its still a bit annoying that I cant create modules in Flexsim 17.

Message 7 of 9

matt_long
Not applicable

You do need to make sure you have the correct version of the module SDK. If you're developing on 17.1 you need to download the SDK that's been tagged for 17.1. (or update your repository to the revision marked 17.0)

0 Likes
Message 8 of 9

MBJEBZSRG
Advocate
Advocate
@Matt Long

But I am not really using the SDK files... I just read the instructions in the QuickStart.html that explains how to make modules in the Flexsim tree. Correct me if I am wrong, but the SDK is only needed to make custom coded modules in Visual C++ right? There is an option to make modules without using the actual SDK files?

0 Likes
Message 9 of 9

matt_long
Not applicable

Yes, if all you're doing is adding nodes to the Main or View tree you don't need the SDK files. I'm not sure what the issue could be. If you want to try and get together on a screen sharing meeting we may be able to figure out what's going on.

0 Likes