Cant update sheet / View looks like raster view

Cant update sheet / View looks like raster view

m_baczewski
Advocate Advocate
237 Views
1 Reply
Message 1 of 2

Cant update sheet / View looks like raster view

m_baczewski
Advocate
Advocate

Hi

 

My drawing rules work after changing the drawing view, and after my rule runs, one of the views looks rasterized and unfortunately, I can't do anything about it. Do you have any ideas why this is happening?

This appeared after adding such a rule:

 

Dim oDrawing As DrawingDocument
oDrawing = ThisApplication.ActiveDocument
oSheet = oDrawing.ActiveSheet
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim genDims = oSheet.DrawingDimensions.GeneralDimensions

Dim drawingViews As DrawingViews
drawingViews = oSheet.DrawingViews

Dim Arkusz_1 = ThisDrawing.Sheets.ItemByName("Arkusz:1")
Dim WIDOK2 = Arkusz_1.DrawingViews.ItemByName("WIDOK2")
Dim Krawedz4 = WIDOK2.GetIntent("Krawedz4")
Dim nameOfCurve As Integer = 5
Dim countOfDimensionsToDelete As Integer = Parameter("DC6_BLACHA.ipt.ilosc_w_szyku") -1
Dim itemToDelete As Integer = 29

If genDims.Count>28
	For i As Integer = 0 To countOfDimensionsToDelete
		If genDims.Count = 28
			Exit For
		End If
		genDims.Item(itemToDelete).Delete
	Next
End If

If Parameter("DC6_BLACHA.ipt.ilosc_w_szyku") > 1
	For i As Integer = 0 To Parameter("DC6_BLACHA.ipt.ilosc_w_szyku")-2
		Krawedz = WIDOK2.GetIntent("Krawedz" + nameOfCurve.ToString)
		polozenieWymiaruWidok2_1 = oTG.CreatePoint2d((WIDOK2.Center.X)/10, (WIDOK2.Center.Y)/10 -3)
		Dim linDim1 = genDims.AddLinear(polozenieWymiaruWidok2_1, Krawedz4, Krawedz)
		nameOfCurve=nameOfCurve+1
	Next
End If

For Each oDrawingDim In oSheet.DrawingDimensions
	If oDrawingDim.Attached = False Then
   		oDrawingDim.Delete
	End If
Next

iLogicVb.RunRule("AUTOMATYCZNE_USTAWIANIE_WYMIAROW")
InventorVb.DocumentUpdate()

'For Each oView In drawingViews
'		oModelDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument
'		oModelDoc.Update
'		'Update the sheet
'		oView.Parent.Update
'	Next




 

 

2023-08-22_08h40_02.png

 

 

0 Likes
238 Views
1 Reply
Reply (1)
Message 2 of 2

m_baczewski
Advocate
Advocate

After running the rule, the "UpToDate" status of the view is False. However, if I change the sheet and then come back to the same sheet, the issue disappears, and then the "UpToDate" status becomes True.

 

If i comment this part of code, it works very well.

'If genDims.Count>28
'	For i As Integer = 0 To countOfDimensionsToDelete
'		If genDims.Count = 28
'			Exit For
'		End If
'		genDims.Item(itemToDelete).Delete
'	Next
'End If
'For Each oDrawingDim In oSheet.DrawingDimensions
'	If oDrawingDim.Attached = False Then
'   		oDrawingDim.Delete
'	End If
'Next


 

0 Likes