@[基于matlab进行caita二次开发]
转换catia的VBA为matlab脚本
使用get(), set() and invoke() functions等函数
例如
Set part1 = partDocument1.Part
becomes:
part1 = get(partDocument1,'Part');
Set body1 = bodies1.Item("Bearing")
becomes:
body1=invoke(bodies1,'Item','Bearing');
part1.InWorkObject = sketch1
becomes:
set(part1,'InWorkObject',sketch1);
sketch1.CloseEdition
becomes:
invoke(sketch1,'CloseEdition');
partDocument1.SaveAs "filename.CATPart"
becomes:
invoke(partDocument1,'SaveAs','filename.CATpart');