Inventor Customization

Reply
Distinguished Contributor
art_turner
Posts: 213
Registered: ‎04-01-2008
Message 1 of 4 (785 Views)
Accepted Solution

Ilogic runrule in idw from rule in assembly

785 Views, 3 Replies
05-02-2013 08:34 PM

 

 i just want to run a rule in an IDW from a rule in an IAM.

 

ASSY1.IAM Rule 1 which in turn runs ASSY1.IDW Rule2

 

something like this(which doesnt work)

 

strfolder =ThisDoc.Path & "\Assembly1.idw"

iLogicVb.RunRule(strfolder, "sav_idw_as_dwg")

 

the files can be hard coded, have the same name in the same directory. the IDW is open.

 

 

 

 

 

Distinguished Contributor
art_turner
Posts: 213
Registered: ‎04-01-2008
Message 2 of 4 (764 Views)

Re: Ilogic runrule in idw from rule in assembly

05-03-2013 12:11 PM in reply to: art_turner

Seems odd you cannot run a rule in an IDW from a rule in an assembly.

 

How about opening the IDW from the Assembly then running a rule based on the After Open event?

 

then can i Close the IDW in the rule in the IDW or should i close the IDW in the rule in the Assembly?

 

 

ADN Support Specialist
Vladimir.Ananyev
Posts: 458
Registered: ‎08-14-2012
Message 3 of 4 (746 Views)

Re: Ilogic runrule in idw from rule in assembly

05-07-2013 07:36 AM in reply to: art_turner

Could you please test this sample code in assembly rule:

'open known drawing document specifying full filename
FullFilename = ThisDoc.Path & "\AAA.idw"
Dim oDoc as DrawingDocument = ThisApplication.Documents.Open(Fullfilename)

'run rule in the drawing document
auto = iLogicVb.Automation
auto.RunRule(oDoc, "IDW_Rule")

'you may also save and close this drawing document
'oDoc.Save
'oDoc.Close

Some operations can be completed in invisible mode (this is faster).  If this applicable open the drawing document wirh argument Visible = False:

Dim oDoc as DrawingDocument = ThisApplication.Documents.Open(Fullfilename, False)

 Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Distinguished Contributor
art_turner
Posts: 213
Registered: ‎04-01-2008
Message 4 of 4 (733 Views)

Re: Ilogic runrule in idw from rule in assembly

05-07-2013 05:52 PM in reply to: Vladimir.Ananyev

thats it. thank you. that is very useful. also i might add, a little dificult to find anywhere. thanks again.

 

 

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