Start a new topic

Vortex SDK in Visual Studio problem

Hello CM Labs:

I got some problems with vortex SDK.

I created a file.vxscene(it is a heavy machine that was supprt by CM Lab mechanism team) in vortex editor,and I tried to use Viusual Studio with SDK to load scene I created.

But here go some problem I can't load file.vxscene

Here is my code:


#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])

{

 Vx::VxSmartPtr<VxSim::VxApplication> application = new VxSim::VxApplication;

 //auto dynamicsModule = VxSim::VxSmartInterface<VxSim::ISimulatorModule>::create(VxSim::VxDynamicsModuleICD::kFactoryKey);

 //application->insertModule(dynamicsModule);

 //Init Vortex Scene

 VxSim::ApplicationConfigSerializer serializer;

 if (!serializer.load("../Resources/assets/ExVHLIntegration/Warehouse.vxscene"))

 {

  Vx::LogError("Couldn't load application config in ../Resources/assets/ExVHLIntegration/Warehouse.vxscene.\n");

 }

 VxSim::VxSmartInterface<VxSim::ApplicationConfig> config = serializer.getApplicationConfig();

 //application->removeModule(dynamicsModule);

 config->apply(application.get());

 //Load the dynamics scene into simulation instance

 auto fileManager = application->getSimulationFileManager();

 VxSim::VxSmartInterface<VxContent::Scene> scene = fileManager->loadObject("../Resources/assets/ExVHLIntegration/Warehouse.vxscene");

 if (!scene.valid())

 {

  Vx::LogError("Couldn't load the scene in ../Resources/assets/ExVHLIntegration/Design/Warehouse.vxscene.\n");

 }

 //auto mechanism = scene->getMechanisms();

 return 0;

}

   

#include "stdafx.h"


int _tmain(int argc, _TCHAR* argv[])
{
	
	Vx::VxSmartPtr<VxSim::VxApplication> application = new VxSim::VxApplication;
	//auto dynamicsModule = VxSim::VxSmartInterface<VxSim::ISimulatorModule>::create(VxSim::VxDynamicsModuleICD::kFactoryKey);

	//application->insertModule(dynamicsModule);
	//Init Vortex Scene
	VxSim::ApplicationConfigSerializer serializer;
	
	if (!serializer.load("../Resources/assets/ExVHLIntegration/Warehouse.vxscene"))
	{
		Vx::LogError("Couldn't load application config in ../Resources/assets/ExVHLIntegration/Warehouse.vxscene.\n");
	}
	
	VxSim::VxSmartInterface<VxSim::ApplicationConfig> config = serializer.getApplicationConfig();
	//application->removeModule(dynamicsModule);
	config->apply(application.get());
	//Load the dynamics scene into simulation instance

	auto fileManager = application->getSimulationFileManager();
	VxSim::VxSmartInterface<VxContent::Scene> scene = fileManager->loadObject("../Resources/assets/ExVHLIntegration/Warehouse.vxscene");
	if (!scene.valid())
	{
		Vx::LogError("Couldn't load the scene in ../Resources/assets/ExVHLIntegration/Design/Warehouse.vxscene.\n");
	}
	//auto mechanism = scene->getMechanisms();
	return 0;
} 

 I put the Warehouse.vxscene  in tutorial/ExVHLIntegration same file 

So I can use same path with ExVHLIntegration

but nothing happen.

How can I do to load my Warehouse.vxscene?


Are you using the Essentials Edition? (If you have a paid license, you should contact Support.)


What you are trying to do is not possible with the Essentials Edition. It only allows creating content with the Editor and to run it via the Player.  


image

Now I need solve this

Login to post a comment