Inventor Customization

Reply
Valued Contributor
theo.bot
Posts: 64
Registered: ‎09-30-2005
Message 1 of 4 (816 Views)

Ilogic: Reposition revision table on sheet size change chanllange!

816 Views, 3 Replies
09-24-2012 06:36 AM

Hi there,

 

a customer has a title block with a revision table ( standard vault revision table)  add on top of it.

If you change the sheet size the revision table remains his position.

 

If found the way to reposition the table with a ilogic rule.:

 

 

'point afstand in cm
PointX=(ActiveSheet.Width/10)-13
PointY=5.5
'punt vanaf rechtonder gemeten in cm

DimoPointAsPoint2d
oPoint=ThisApplication.TransientGeometry.Createpoint2d(PointX,PointY)
'her positioneel revisiontable
ActiveSheet.Sheet.RevisionTables.Item(1).Position=oPoint

InventorVb.DocumentUpdate()

This is working perfectly.

 

But now the challange how to trigger this rule to run if you change the sheet size?

 

if tried:

 

trigger=Activesheet.size

 

or

 

to create a userparameter and added this line in my rule : Size=ActiveSheet.size, normaly is you change parameters it triggers the rule to rule.

 

but both way didn't work.

 

Can event triggers from the API be used?  Do i need the "Onchange" event?

Can anyone give an example for a ilogic rule?

 

Kind regards,

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

Re: Ilogic: Reposition revision table on sheet size change chanllange!

09-26-2012 11:43 PM in reply to: theo.bot

Is Before Save Document event acceptable in your case?  This is not exactly that you asked but... you should periodically save your drawings, shouldn't you?

Rule_Triggered_by_Events_Dialog.jpg

 


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Valued Contributor
theo.bot
Posts: 64
Registered: ‎09-30-2005
Message 3 of 4 (795 Views)

Re: Ilogic: Reposition revision table on sheet size change chanllange!

09-27-2012 02:28 AM in reply to: Vladimir.Ananyev

I know that i can use the before save and it would work.

 

But it would  be nice to trigger the rule when changing the sheet size. so it save's extra actions.

 

So is it possible or not to use a api event trigger in a ilogic rule? 

ADN Support Specialist
xiaodong.liang
Posts: 1,233
Registered: ‎06-12-2011
Message 4 of 4 (756 Views)

Re: Ilogic: Reposition revision table on sheet size change chanllange!

10-11-2012 11:23 PM in reply to: theo.bot

Hi,

 

It looks to me the only way is to start OnChange event by Inventor API, and execute the iLogic rule, as you have thought of. Following is a small piece on how to call a rule in Inventor API.

 

 

 'Iterates through Inventor Add-Ins collection 
For Each oAddIn As ApplicationAddIn In InventorApplication.ApplicationAddIns 
'Looks for iLogic Addin CLSID; Note this GUID is AddIn specific, you will need to insert your own AddIn's ClassID! 
If (oAddIn.ClassIdString = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}") Then 
'Calls Automation property 
Dim oAddInInterface As IiLogicAutomation = CType(oAddIn.Automation, IiLogicAutomation) 
'Calls Execute Method of IiLogicAutomation 
Dim oRule As iLogicRule = oAddInInterface.GetRule(InventorApplication.ActiveDocument, "Test") 
Exit For 
End If 
Next

 



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

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