Edit Chamfer Precision with iLogic

Edit Chamfer Precision with iLogic

workexperience5BMQQ
Explorer Explorer
247 Views
2 Replies
Message 1 of 3

Edit Chamfer Precision with iLogic

workexperience5BMQQ
Explorer
Explorer

Hi,

I'm attempting to make a rule which will edit the precision of selected Chamfer Notes.

 

I am able to change the Linear Precision Enum as the MessageBox outputs a different value when I change it but it has no effect on the actual precision which is displayed on the chamfer note on the drawing. So I have no idea what the problem is.

 

Here is the code so far. Thanks in advance!

Dim oDoc As DrawingDocument = ThisDoc.Document
Dim oSheet As Sheet = oDoc.ActiveSheet

Dim oChamferNote As ChamferNote
Dim oSSet As SelectSet = oDoc.SelectSet

For Each oChamferNote In oSheet.DrawingNotes.ChamferNotes
	
	oChamferNote.DimensionStyle.LinearPrecision = 41729
	oChamferNote.DimensionStyle.AngularPrecision = 42241
	
	MessageBox.Show(oChamferNote.DimensionStyle.LinearPrecision)
Next

 

 

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

basautomationservices
Advocate
Advocate

Hi,

 

For me your rule works fine. Maybe the view is not refreshing? Does it update when you move the view containing this dimension?

 

basautomationservices_0-1651648257995.png  

basautomationservices_1-1651648276784.png

 

 

Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro


0 Likes
Message 3 of 3

workexperience5BMQQ
Explorer
Explorer

Hi,

No, sadly it still doesn't change when I move it.

I have however found that my work place has a style setup to change the Chamfer Precision.

So I updated the rule to change the style of the Chamfer instead.

Here it is if someone will find it useful:

Dim oDoc As DrawingDocument = ThisDoc.Document
Dim oSheet As Sheet = oDoc.ActiveSheet

Dim oChamferNote As ChamferNote

Dim oStylesMgr As DrawingStylesManager = oDoc.StylesManager
Dim oDimStyle As DimensionStyle = oStylesMgr.DimensionStyles.Item("Name of Style")

For Each oChamferNote In oSheet.DrawingNotes.ChamferNotes
	oChamferNote.DimensionStyle = oDimStyle
Next 

 Thanks.

0 Likes