Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

create and close drawings

7 REPLIES 7
Reply
Message 1 of 8
alundr
965 Views, 7 Replies

create and close drawings

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?

Tags (1)
7 REPLIES 7
Message 2 of 8
amandamao
in reply to: alundr

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   

Message 3 of 8
bsee1
in reply to: amandamao

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
Message 4 of 8
AlexKorzun
in reply to: bsee1

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.

 

Thank you,




Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.

Message 5 of 8
ludesroc
in reply to: AlexKorzun

Hi Alex,

 

Regarding IvTemplateDrawing...Is there a way to ajust the view scale?

 

Child TheDrawing As :TemplateDrawing
ExternalReference = ThePart.memberPathName

ViewScale = ???

End Child

 

Regards,

Ludesroc
Message 6 of 8
AlexKorzun
in reply to: ludesroc

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.

Thank you,




Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.

Message 7 of 8
ludesroc
in reply to: AlexKorzun

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,

Ludesroc
Message 8 of 8
AlexKorzun
in reply to: ludesroc

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:

1.jpg

 

Height = 100.0;

2.jpg

Thank you,




Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report