Use Saved Project and Run the simulation

Forum Forums Visual Components 4.1 .NET Addon Programming Use Saved Project and Run the simulation

This topic contains 2 replies, has 3 voices, and was last updated by Avatar jouha 5 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14122
    Avatar
    jaisantosh.d
    Participant

    How to call (or use) saved project (.vcmx file) in .NET and how to run the simulation (Once the VC opens) using .NET API code?

    #14151
    zesty
    zesty
    Moderator

    Take a look at ISimulation and the ISimulationService. As for loading saved project, look at IApplication and ISimWorld.

    #14170
    Avatar
    jouha
    Moderator

    Addition to zesty’s hints: You can create a plugin that runs the simulation automatically once a layout is opened. And if you have associated .vcmx files to open with VC it should open that layout automatically (by double-clicking in file explorer) once VC has initialized.

    So all you need to do in the plugin is to use LayoutLoaded event of IApplication and to start the sim, RunSimulation method of ISimulationService.

    For creating such plugin refer to:

    http://academy.visualcomponents.com/lessons/add-a-background-plugin/

    http://academy.visualcomponents.com/lessons/use-context-and-event-handlers/

     

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.