Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lines and shading don't match while rescaling

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
154 Views, 2 Replies

lines and shading don't match while rescaling

I use ole automation from delphi to automate drawings.
The delphi program changes parameters in the ipt and then updates the idw.
This works fine but in the final step I change DrawingView.Scale. Then the shading and the lines are scaled differently (see attachment).
Code:
DrawingView.Scale := 0.200;
DrawingDocument.Activate;
DrawingDocuent.Update;
for i := 1 to 100 do app.ProcessMessages();

When I put Inventor on the foreground then everything works correctly.

- Is there an other method than "Update" to update the drawingdocument?
- Is there a method to bring Inventor to the foreground?

I use Inventor 2008 SP2. With Inventor 10 I didn't have this problem.
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Drawings require that they have focus in order for them to update correctly.
Even though this is being avoided as much as possible, some workflows such
as yours still require that the window have focus.

Try adding a call to AppActivate to bring Inventor to the foreground:

AppActivate(Application.Caption);

where Application is Inventor's Application object.

Sanjay-
Message 3 of 3
Anonymous
in reply to: Anonymous

Thanks Sanjay.
I already implemented your solution, although it isn't a very elegant one.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report