SDAI file contains the equivalent information as a part21 (ISO 10303-21) file, but in a binary encoded way which can be much faster processed and needs less storage space. SDAI file can be easily used for exchange.
SDAI file features:
If you want to create a SdaiRepository to be stored in SDAI file then use createRepository() method and pass path of SDAI file as a location (second) parameter. If the value of the name (first) parameter is null or an empty string "", then a SdaiRepository with name derived from SDAI file name will be created. If SdaiRepository with the specified or derived name already exists, then SdaiRepository with modified name (SdaiRepository name plus sequence number) will be created.
Example
// create SdaiRepositories stored in SDAI files
repo = s.createRepository("MyRepo1", "c:\\myrepos\\MyRepo.sdai");
repo = s.createRepository("", "c:\\MyRepo2.sdai");
repo = s.createRepository(null, "c:\\MyRepo2.sdai");
If createRepository() method is called with location parameter set to null, then SdaiRepository is created into sdairepos directory and it's format depends on the value of an additional property new.repository.format in jsdai.properties file.
Example
//fragment of jsdai.properties file
new.repository.format = SDAI
// create SdaiRepository stored in SDAI file in sdairepos directory
repo = s.createRepository("MyRepo", null);
Example
// link SdaiRepositories stored in SDAI files
rep = s.linkRepository("MyRepo1", "c:\\myrepos\\MyRepo.sdai");
rep = s.linkRepository("", "c:\\MyRepo2.sdai");
rep = s.linkRepository(null, "c:\\MyRepo2.sdai");
During session start all SdaiRepositories (conventional and stored in SDAI files) located in sdairepos directory are automatically linked to known_servers.
SDAI file format has several advantages:
SDAI file format specification