Hi,
Manually If I double-click on a face to select also tangented faces, overwriting take few seconds (less 2 seconds) for 20 faces.
With code below, this operation take more 16 seconds for the sames 20 faces!
Which commands is use by manual method or how improve it?
Thanks
Dim oPartDoc As PartDocument oPartDoc = ThisApplication.ActiveDocument Dim oFace As Face Try oFace = oPartDoc.SelectSet.Item(1) Catch Exit Sub End Try Dim oColorAsset As Asset Try oColorAsset = oPartDoc.AppearanceAssets.Item("Or") Catch Exit Sub End Try oFace.Appearance = oColorAsset Dim oTangentedface As Face For Each oTangentedface In oFace.TangentiallyConnectedFaces oTangentedface.Appearance = oColorAsset Next
Solved! Go to Solution.
Solved by fsanchou. Go to Solution.
Can you attach a data to reproduce the problem? Don't attach confidential data.
Hi @YuhanZhang,
As I can't send confidential data, I wanted to create a sample data sample.
And of course, in sample data, code works correctly ... 😉
So by exploring my data, I found problem comes from flatpattern update!
By adding code bellow, that works correctly:
oPartDoc.FlatPatternSettings.DeferUpdate = True '..... execution oPartDoc.FlatPatternSettings.DeferUpdate = False
Thanks
Glad to hear you solved it by yourself:).
Can't find what you're looking for? Ask the community or share your knowledge.