[TS6] Get shapes separately
Posted: Thu Jul 07, 2016 6:38 pm
Hello!
I'm trying to do an automation that exports all shapes into separately files.
i tried something like this:
this code in some elements return more than one shape ):
Thanks in advance,
I'm trying to do an automation that exports all shapes into separately files.
i tried something like this:
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
TopSolid.Application MyApp = new TopSolid.Application();
MyApp.ProgramUnitAngle = "deg";
MyApp.ProgramUnitLength = "mm";
MainDocument = (Document)MyApp.ActiveDocument;
foreach (TopSolid.Element elmnt in MainDocument.Shapes)
{
try
{
elmnt.SaveInFile(@"C:\Users\g.manucci\Desktop\teste", elmnt.Designation, TopInterface.topInterfaceTop);
}
catch { }
}
}
Thanks in advance,