Home
Reply
Regular Contributor
yadongshen
Posts: 44

trouble saving the geometry in file

hi, all

 

i created a geometry and intended to save as .sat in file.

 

It turned out everything is ok except the erro saving file

 

i am lost.

 

Thanks in advance



Regular Contributor
yadongshen
Posts: 44

Re: trouble saving the geometry in file

//create an entity list and add the geometry to it

int check = 1;

ENTITY_LIST list;

list.add(geom_a,check);

 

//Save the entity list to the file

res = api_save_entity_list(save_file,TRUE,list,ao);

if(!res.ok()){printf("Error saving geometry\n");getchar();exit(1);}

AR
Contributor
AR
Posts: 23

Re: trouble saving the geometry in file

Before calling api_save_entity_list, you need to:

  1. Create and set FileInfo,
  2. Open the FILE in write mode.

See this example. (No need to set the sequence_save_file option)

 

FYI: You can find sample usage of ACIS APIs in your scm or scmext folders.

 

AR