Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Title Block doesn't update custom iproperties driven from ilogic rule

RockieM
Advocate

Title Block doesn't update custom iproperties driven from ilogic rule

RockieM
Advocate
Advocate

Hi there,

 

I have an ilogic rule helps automate most of our revision processes.  It populates a number of iproperties in the model document, some being normal iproperties and a number of custom iproperties.  These then populate in the .idw flawlessly unless the model document is an assembly with any sort of Representation involved (View, Position, LOD).  I have 7 users using my rules who always bring this to my attention, so I want remedy this so I don't run into this again.

 

I do have this at the end of my code: InventorVb.DocumentUpdate()  but it doesn't update.

 

Manually I can get it to work by saving the file, moving the base view in the idw a bit and then update in the file which is normally greyed out until I move the base view.

 

Update Copied Properties doesn't work for this

 

Anybody have any ideas on this?

 

Thanks!@

Rockie (Inventor 2019)

 

0 Likes
Reply
456 Views
4 Replies
Replies (4)

RockieM
Advocate
Advocate

Another way to do it manually is to open the assembly file with the same (View, Position, LOD) representations as the base view in the .idw.  Edit the iproperties I want and they will automatically update in the idw.  So I guess I could do is the following:

1) query the names of the (View, Position, LOD) representations in the base view of the .idw.

2) Open the assembly with the proper representations

3) Populate my iproperties. (This should automatically update my title block)

 

 

So far I've gotten this: but returns a blank if the name is anything other than "Default" or "Master"

Can anybody tell me if I'm going in the right direction on this?

 

'active drawing doc
    Dim oDrawDoc As DrawingDocument
    	oDrawDoc = ThisApplication.ActiveDocument
    'active sheet
    Dim oSheet As Sheet
    	oSheet = oDrawDoc.ActiveSheet
    'the 1st drawing view
    Dim oView As DrawingView
    	oView = oSheet.DrawingViews.Item(1)
		
	Dim oDesign, oLOD, oPosition As String
		
		oDesign = oView.ActiveDesignViewRepresentation
		MessageBox.Show(oDesign, "Design")

        oLOD = oView.ActiveLevelOfDetailRepresentation
		MessageBox.Show(oLOD, "Level Of Detail")
		
		oPosition = oView.ActivePositionalRepresentation
		MessageBox.Show(oPosition, "Position")

Thanks!

Rockie

tonythm
Advocate
Advocate

Hello @RockieM 

 

Please try:

iLogicVb.UpdateWhenDone=True
InventorVb.DocumentUpdate(True)

 

RockieM
Advocate
Advocate

Thanks for the reply, but it doesn't work for me.

 

The drawings still won't update.  The update icons in the quick access toolbar are greyed out until I move the base view a bit manually and then it allows me to update the drawing.  After the update is performed then the .idw title block populates as it should.

 

I tried moving the base view in the ilogic rule but it still doesn't work.  It seems to be a glitch that has to remedied manually. 

0 Likes

tonythm
Advocate
Advocate

Hello @RockieM 

 

Please try this one:

Dim oCurrentSheet As Sheet
oCurrentSheet = ThisDoc.Document.ActiveSheet
	
	' Iterate through the sheets
	Dim oSheet As Sheet
	For Each oSheet In ThisDoc.Document.Sheets
		oSheet.Activate
		oSheet.Update	
	Next

 

0 Likes