iLogic Drawing View Label Position not working with Flat Pattern views?

iLogic Drawing View Label Position not working with Flat Pattern views?

andrew.tom.reynolds
Advocate Advocate
390 Views
2 Replies
Message 1 of 3

iLogic Drawing View Label Position not working with Flat Pattern views?

andrew.tom.reynolds
Advocate
Advocate

I'm using a few short lines of iLogic to update my flat pattern drawing views from a configurable model and I was wondering why i couldn't get it to work. Then I tested it on an assembly drawing and then on a drawing with the folded parts and it works fine. It seems that it doesn't work on views which are flat patterns!

 

The original info came from here: https://forums.autodesk.com/t5/inventor-customization/drawing-view-label-position-with-ilogic/m-p/64...

 

Can anyone help me with some alternative that will work with flat patterns, or is this a bug??

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet

Dim mDocQty As Double

Dim mDoc As Document

For Each oView As DrawingView In oSheet.DrawingViews
	mDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument
	mDocQty = mDoc.PropertySets.Item("Inventor User Defined Properties").Item("QTY").Value 
	
	wPoint = ThisApplication.TransientGeometry.CreatePoint2d(oView.Center.X, oView.Center.Y)		
	oView.Label.Position = wPoint
	
	If mDocQty = 0 Then
		oView.Suppressed = True
	Else 
		oView.Suppressed = False
	End If 
Next

Thanks!

 

0 Likes
391 Views
2 Replies
Replies (2)
Message 2 of 3

JhoelForshav
Mentor
Mentor

Hi @andrew.tom.reynolds 

I tested the code and it works on flat pattern views for me. Given that the sheet metal part has a custom iProperty called "QTY". I'm running inventor 2020.

 

Are you saying that it works for a view of a folded sheetmetal part but not for the flat pattern view of the same part?

0 Likes
Message 3 of 3

andrew.tom.reynolds
Advocate
Advocate

Hey sorry, in testing it again i've discovered that on the specific drawing sheet I was using it had the information as text on a sketch attached to the view, not using the view label.

I've tried it again on a fresh drawing and it's working fine... False alarm!

0 Likes