+

Search Tips   |   Advanced Search


CloseProject

Description

The CloseProject method sends a request to close the current project.

Parameters

REST example

POST http://localhost:7400/Design/v1/Service.svc/CloseProject HTTP/1.1
Accept: application/json
Content-Type:application/json
Cache-Control:nocache
Pragma: nocache
User-Agent:Java/1.7.0_10
Host: localhost:7400
Connection: keepalive
Content-Length:46
{"d": {
    "Save": true,
"ForceStop": true
}}

Use case with Command Line Designer

java -cp "api/Common/java/*;api/Design API Client/java/*" com.neotys.rest.design.client.CommandLineDesigner -designAPIURL http://localhost:7400/Design/v1/Service.svc/ -command CloseProject -Save true -ForceStop true

Use case with Java Client Designer

import com.neotys.rest.design.client.DesignAPIClient;
import com.neotys.rest.design.client.DesignAPIClientFactory;
import com.neotys.rest.design.model.CloseProjectParams.CloseProjectParamsBuilder;
public class Main {
	public static void main(String[] args) throws Exception {
		final String url = "http://localhost:7400/Design/v1/Service.svc";
		final DesignAPIClient client = DesignAPIClientFactory.newClient(url);
		client.closeProject(new CloseProjectParamsBuilder()
				.forceStop(true)
				.save(true)
				.build());
	}
}

Use case with C#Client

using Neotys.DesignAPI.Client;
using Neotys.DesignAPI.Model;

namespace Design
{
    class CloseProject
    {
        static void Main(string[] args)
        {
            string url = "http://localhost:7400/Design/v1/Service.svc/";
            IDesignAPIClient client = DesignAPIClientFactory.NewClient(url);

            client.CloseProject(new CloseProjectParamsBuilder()
                                .forceStop(true)
                                .save(true)
                                .Build());
        }
    }
}


Home