Inventor General

Reply
Active Contributor
-ianf-
Posts: 28
Registered: ‎01-07-2010
Message 1 of 5 (380 Views)
Accepted Solution

Simple ilogic Rule?

380 Views, 4 Replies
10-26-2012 03:33 AM

Hi,

 

Our drawing borders have a Mass on them driven by the physical properties of the model.

We have had issues where the mass on the drawings would read "N/A" when the models were updated. I have partially solved this by altering the settings in the general tab to "update phyiscal properties on save".

 

This works fine most of the time. However it is still possible to update the model then view the drawing and save it without saving the model first. This results in the "N/A" appearing in the mass box.

 

Is there a simple way of ensuring the model is saved before the drawing is saved, thus forcing a physical property update?    ilogic perhaps?

 

Thanks.

Ian Farmery
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000
*Expert Elite*
mrattray
Posts: 2,456
Registered: ‎09-13-2011
Message 2 of 5 (371 Views)

Re: Simple ilogic Rule?

10-26-2012 04:39 AM in reply to: -ianf-

In the drawing:

1) Create a rule.

2) Insert this line:

 

 ThisDrawing.ModelDocument.Save

3)  Go to Manage>iLogic>Event Triggers.

4) Add your new rule to the Before Save Document event

 

 

Mike (not Matt) Rattray

Active Contributor
-ianf-
Posts: 28
Registered: ‎01-07-2010
Message 3 of 5 (346 Views)

Simple ilogic Rule?

10-29-2012 12:50 AM in reply to: mrattray

Thanks for the response Mike,

Can't get the rule to work.

returns the following ilogic error:

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

 

We have 2011 sould this be the reason?

Ian Farmery
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000
*Expert Elite*
mrattray
Posts: 2,456
Registered: ‎09-13-2011
Message 4 of 5 (330 Views)

Re: Simple ilogic Rule?

10-29-2012 04:40 AM in reply to: -ianf-

Your Inventor version shouldn't be an issue, VBA is VBA. Unfortunately an unspecified error could be anything. Has this model been saved before? The Save method requires that the model have already been saved before. Is the file read-only? Do you have write permission for the location where the file is stored? Is Vault involved? Is the wind blowing from the East? Are you using LOD's?

Mike (not Matt) Rattray

Active Contributor
-ianf-
Posts: 28
Registered: ‎01-07-2010
Message 5 of 5 (295 Views)

Re: Simple ilogic Rule?

11-01-2012 02:37 AM in reply to: mrattray

Thanks, I see. The file was new and needed an initial save.

 

Many thanks.

Ian Farmery
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube