Autodesk Inventor Engineer-to-Order
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I am creating my drawings with ETO. It correctly creates a drawing file and opens the file. How do I create the drawing file without opening it?
Re: create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I suppose its the default way we currently handle it, will consider for the slient way, not only for this case, I think.
Thanks,
Amanda
Re: create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I'll give this a +1. We would also like to see a silent drawing generation mode. Our drawing takes considerable time to update, and it would be nice if it could be done in the background, or silently.
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000
Inventor 2013
ETO 6.1
Re: create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
For just in case: if you need to produce drawings referencing the similar contents, the IvTemplateDrawing might be handy. By Adopting the Inventor drawing file, the new Design with the ExternalReference Parameter in it will be created. As the ExternalReference is supplied, the whole drawing document is updated.
We distribute sample "TemplatedAssembly.iam" that demos the concept.
Alex Korzun
Principal Engineer
Inventor Engineer-to-Order
Re: create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Alex,
Regarding IvTemplateDrawing...Is there a way to ajust the view scale?
Child TheDrawing As :TemplateDrawing
ExternalReference = ThePart.memberPathName
ViewScale = ???
End Child
Regards,
Re: create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
You have to edit the drawing template via Inventor API or manually, to change the view scale and lay out the drawing views.
Next time when Intent uses the IvTemplateDrawing Part that references the template, it will produce the resulting drawing based on these changes.
Alex Korzun
Principal Engineer
Inventor Engineer-to-Order
Re: create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Alex,
Actually, I would like the view scale to adjust based on the model size. In this sample (TemplatedAssembly.iam) if you increase or decrease the OuterD value...the views are not size properly.
Regards,
Re: create and close drawings
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
the C# code below changes the height of thePart and adjusts views scale based on thePart.Height . It is possible to add other part dimensions into consideration.
Please note that more factors you want to control on the Drawing, the most likely you need to use IvDrawingDocument.
The different way to approach the solution is to switch to the template with the "right" view scale
static void Test(IHostAPI addinModel, Inventor.Application ThisApplication)
{
IntentAPI api = Autodesk.Intent.IntentAPI.Instance;
Part thePart = api.ActiveRoot["ThePart"];
double height = 30.0;
thePart.SetRuleValue("height", height);
Part theDrawing = api.ActiveRoot["TheDrawing"];
string templateFile = theDrawing["TemplateFile"];
DrawingDocument templateDrawing = ThisApplication.Documents.Open(templateFile) as DrawingDocument;
foreach( DrawingView view in templateDrawing.Sheets[1].DrawingViews)
{
if( !view.ScaleFromBase)
view.Scale = 100/height; // fugde factor. Depends on desired view W/H
}
using( new SilentOperation( ThisApplication))
{
templateDrawing.Save();
templateDrawing.Close();
}
}
class SilentOperation : IDisposable
{
Inventor.Application _App;
public SilentOperation(Inventor.Application app)
{
_App = app;
_App.SilentOperation = true;
}
public void Dispose()
{
_App.SilentOperation = false;
}
}
Height = 30:
Height = 100.0;
Alex Korzun
Principal Engineer
Inventor Engineer-to-Order

