Page 1 of 1
What is a BOM Document?
Posted: Fri Jul 17, 2015 1:17 pm
by GMP Marcatto
Hello everybody!
i'm new here, and i'm doing some automations on TopSolid 7.9.300...
And i didn't find anywhere what is a BOM Document.
Can someone help me?
Re: What is a BOM Document?
Posted: Fri Jul 17, 2015 6:55 pm
by Mark Oostveen
Bill of material document. Used to creatie and manage a Bill Of Material. This then can be added to a drawing.
Re: What is a BOM Document?
Posted: Fri Jul 17, 2015 6:58 pm
by GMP Marcatto
alright, thanks,
so why i need a BOM Document to export an drafting file?
Re: What is a BOM Document?
Posted: Fri Jul 17, 2015 8:02 pm
by Mark Oostveen
You don't I think. Why do you think you need one? Can you explain.
Re: What is a BOM Document?
Posted: Fri Jul 17, 2015 9:40 pm
by GMP Marcatto
i want to export an draft file to pdf.
on TopSolid 7.x, the API give us these methods:
TopSolidHost.Documents.ExportWithOptions(int inExporterIx, System.Collections.Generic.List<KeyValue> inOptions, TopSolid.Kernel.Automating.DocumentId inDocumentId, string inFullName)
TopSolidHost.Documents.Export(int inExporterIx, TopSolid.Kernel.Automating.DocumentId inDocumentId, string inFullName)
but first, we have the TopSolidHost.Documents.CanExport(int inExporterIx, TopSolid.Kernel.Automating.DocumentId inDocumentId)
That returns if u can export these file with these inExporterIx.
i have to count the exporters (IApplication.ExporterCount <- will return how much exporters i have)
Then i have to test if i can export x file with y exporter.
Ok, on exporting, they don't give me an option of file extension, i just get these numbers (inExporterIx) as KeyValue.
When i try to export some draft file to PDF they create an broken PDF file.
I am using the inExporterIx 13, but i can use 10, 11 aswell (exports to dwg and TopPkg)
Re: What is a BOM Document?
Posted: Fri Jul 17, 2015 10:06 pm
by Mark Oostveen
I never tried exporting in V7.x using the API.
Can't it be that you use the wrong exporter? Exporting to example.pdf with let's say a dwg exporter will leave you with a unreadable PDF of coarse.
I will see when I am back at my computer if I can find something. For now it is weekend.
Good luck.
Re: What is a BOM Document?
Posted: Fri Jul 17, 2015 10:16 pm
by Mark Oostveen
OK one last shot.
Under IAPPLICATION you have getexporterfiletype. The result I a list of extensions from a exporter index. Yo can run through the available exporters and test their extension the support. Than Yo are sure you have the right exporter.
Maybe that helps.
Re: What is a BOM Document?
Posted: Fri Jul 24, 2015 3:53 pm
by GMP Marcatto
i'll check it, thanks!
Re: What is a BOM Document?
Posted: Fri Jul 24, 2015 5:15 pm
by GMP Marcatto
ok, checked.
for draft file it appears
exporter 10 > "Acrobat PDF3D"
exporter 11 > "AutoCad"
exporter 13 > "ME10"
Code: Select all
DocumentId file = TopSolidHost.Documents.EditedDocument;
//IApplication TS_APP = TopSolidHost.Application;
TopSolidHost.Documents.Export(10, file, @"C:\Users\gmanucci\Desktop\test.pdf");
exporter 10 not working
Re: What is a BOM Document?
Posted: Mon Jul 27, 2015 1:16 pm
by Mark Oostveen
Try using a pdf-printer and print the file. That's the way I did in V6.x