Computer Aided Design Environment for Composites (CADEC) 12.0.4913.18168

Software support for Introduction to Composite Materials Design-- 2nd Edition, CRC (2010) by Ever J. Barbero
Skip Navigation Links.
Loading
Skip Navigation Links CADEC : Help : API

Try the new CADEC Web Service!

This feature allows you to use your CADEC objects in other platforms such as Abaqus® , Matlab®, Python, .NET, Mathematica®, etc.

This interface is experimental, so any feedback is appreciated.

Connect using Abaqus
  1. Download PySimpleSOAP
  2. Open client.py, change line 103, from this
    self.http = Http(timeout=TIMEOUT, cacert=cacert, proxy=proxy, sessions=sessions)
    
    to this:
    self.http = Http(cacert=cacert, proxy=proxy, sessions=sessions)
    
  3. Save client.py
  4. Copy pysimplesoap folder to C:\SIMULIA\Abaqus\[Abaqus Version]\Python\Lib\
  5. Start Abaqus CAE
  6. Run this code in the prompt
from pysimplesoap.client import SoapClient
client = SoapClient(wsdl="http://www.cadec-online.com/API.asmx?WSDL",trace=False, sessions=True)
client.Login("UserName", "Password")
client.Laminates()
Connect using C#
  1. Create a Console application
  2. In Solution Explorer, References, Add Service Reference
  3. Click in Advanced...
  4. Click in Add Web Reference...
  5. in URL type http://www.cadec-online.com/API.asmx
  6. in Web Reference Name type CADEC
  7. Type this code
CADEC.API MyCadec = new CADEC.API();
MyCadec.CookieContainer = new System.Net.CookieContainer();
if (MyCadec.Login("username", "password"))
{

    Console.WriteLine("LaminaId Lamina Name");
    foreach (String[] Lamina in MyCadec.Laminae())
    {
        Console.WriteLine(Lamina[0] + " " + Lamina[1]);
    }
}
else
{
    Console.WriteLine("Unable to login");
}

Console.ReadLine();
Connect Using Matlab
  1. Write callSoapService, select the word, right click, Open
  2. Write global cookie; just bellow the documentation
  3. Write this below %Set the appropriate HTTP parameters.
    if (~isempty(cookie))
        httpConn.setRequestProperty('Cookie', concat(concat(cookie.Name,'='),cookie.Value))
    end
  4. Write this bellow byteArrayOutputStream.close;
    i=0;
    while true
    	headerField = httpConn.getHeaderField(i);
    	if (headerField ~= '')
    		if (strcmp(httpConn.getHeaderFieldKey(i), 'Set-Cookie'))
    			headerField = headerField.substring(0,headerField.indexOf(';'));
    			cookie.Name = headerField.substring(0, headerField.indexOf('='));
    			cookie.Value = headerField.substring(headerField.indexOf('=') + 1, headerField.length());
    		end
    	else
    		break
    	end
    	i = i+1;
    end
    
  5. Save callSoapService
  6. Write this in the prompt
    createClassFromWsdl('http://www.cadec-online.com/API.asmx?WSDL')
    obj = API
    Login(obj, 'username', 'password')
    Laminae(obj)
    
Connect Using Mathematica
  1. Run this code
InstallService["http://www.cadec-online.com/API.asmx?WSDL"];
Login["user", "password"];
Fiber[Fibers[][[1, 1]]]
Logout[];

Try it at API