SDC API is a set of methods that help to automate the process of interaction with SDC Verifier.

To run SDC API execute Automation - SDC API Console from the main menu.

SDC API | SDC Verifier

Press Execute to run the script.

Note: SDC API can be run even if a project is not opened in SDC Verifier.

Note: Script is based on the C# programming language.

Note: Script is saved withing the SDC session and can be modified at any time.

SdcApi is a static class that contains all the available functions of SDC Verifier API. Type “SdcAPI.” to list all available functions:

SDC API Intellisense | SDC Verifier

Script can be saved to the text file and run from the command line. Run SDC Verifier.exe with argument –script:”PathToScript.txt” from command line:

SDC API Command Line| SDC Verifier

Important Commands

Project Commands

Open/start new project in SDC Verifier:

SdcApi.NewProject(projectFileName, modelFileName) - start new project with defined path (will be used in saving) and open the model from the defined path. Previous project will be saved automatically;

SdcApi.OpenProject(projectFileName) - open existing project from the defined project path. Previous project will be saved automatically;

SdcApi.OpenProjectAsTemplate (projectFileName, sourceProjectFileName, modelFileName) - start new project with defined path (will be used in saving) from existing project using the different model;

SdcApi.SaveProject() - save project;

SdcApi.SaveProjectAs(projectFilePath) - save project at custom path;

SdcApi.Exit - close SDC Verifier without saving the project.

Load Commands

Commands are similar for all load types (Individual Loads, Load Sets, Load Groups and Fatigue Groups):

SdcApi.AddLoadSet(name, jobId, individualLoadsIds, factors, safetyFactor) - add single load set to defined job using ids of individual loads, respective factors (position should match with the loads) and set safety factor of the load;

SdcApi.GetLoadSets(jobId) - get all load sets from the job;

SdcApi.RemoveILoadSet(jobId, loadId) - remove load set from defined job by id;

SdcApi.RemoveLoadSets(jobId, loadIds) - remove multiple load sets by ids from the job;

SdcApi.RemoveAllLoadSets(jobId) - remove all load sets from the job;

SdcApi.ImportLoadSets(filePath, jobId) - import load sets from Excel file (see structure of the file below) to the job:

SDC API Load Sets Structure | SDC Verifier

SdcApi.ImportNamesForLoadSets(filePath, jobId) - import names from Excel file (see structure of the file below). Empty names will be skipped;

SDC API Names Structure | SDC Verifier

SdcApi.SetSafetyFactorForLoadSet(jobId, loadId, safetyFactor) - set safety factor for load set;

It is possible to loop over all loads to set same factor for all load sets use the following code:

SDC API Load Sets Safety Factor | SDC Verifier

Other Commands

SdcApi.AddStandard...(title) - add standard with defined title of selected type (e.g. SdcApi.AddStandardEurocode3Fatigue("EC3 Fatigue")). Use tooltips to choose the necessary standard;

SdcApi.CreateSelectionAll(ModelInterface.MeshType meshType) - create elemental/nodal selection with the All Entities condition;

SdcApi.CreateSelectionAllWeld(ModelInterface.MeshType meshType) - create elemental/nodal selection with the All Welds condition;

SdcApi.SetYield(materialId, value) - apply the Yield Stress value to the selected material;

SdcApi.SetTensile(materialId, value) - apply the Tensile Strength value to the selected material;

SdcApi.Recognize... - start recognition of selected structural members (welds, beam members, plates). Use tooltips to choose the necessary recognition process (e.g. SdcApi.RecognizeWelds());

SdcApi.AddReportDesigner(SDC.Report.Enums.ReportType reportType) - add new report designer of the defined type (empty, full, results, model setup);

SdcApi.GenerateReport(reportId, documentPath) - generate report and export to MS Word document at the custom path;

SdcApi.SdcApi.GetReportItemByName(reportId, name) - find item of a defined name in the necessary report by name. Only complete match is taken into account, case is ignored;

SdcApi.ChangeLoad(item, load) - replace the load in all tables/plots at all sublevels under the selected item. Load in tables/plots with multiple loads (e.g. flow tables, histogram plots) will be changed;