wrong placement of dimension in drawing after update links of part
wrong placement of dimension in drawing after update links of part
(OP)
hi,
I am trying to make a macro to update links between CATDrawing and CATPart. After execution of the macro, there are losses colored red annotations.
Here is my code:
Sub CATMain()
partFile = CATIA.ActiveDocument.FullName
Set partDoc = CATIA.Documents.Read(partFile)
Set myPart = partDoc.Part
drwFile = Replace(partFile, "Part", "Drawing")
Set drwDoc = CATIA.Documents.Open(drwFile)
Set mySheet = CATIA.ActiveDocument.Sheets.Item("Sheet.1")
For i = 1 To mySheet.Views.Count
Set myView = mySheet.Views.Item(i)
Set vLinks = myView.GenerativeLinks
vLinks.RemoveAllLinks
If InStr(myView.Name, "Main") < 1 Then
If InStr(myView.Name, "Background" ) < 1 Then
vLinks.AddLink myPart
End If
End If
Next
mySheet.ForceUpdate
'CATIA.ActiveDocument.Save
End Sub
I am trying to make a macro to update links between CATDrawing and CATPart. After execution of the macro, there are losses colored red annotations.
Here is my code:
Sub CATMain()
partFile = CATIA.ActiveDocument.FullName
Set partDoc = CATIA.Documents.Read(partFile)
Set myPart = partDoc.Part
drwFile = Replace(partFile, "Part", "Drawing")
Set drwDoc = CATIA.Documents.Open(drwFile)
Set mySheet = CATIA.ActiveDocument.Sheets.Item("Sheet.1")
For i = 1 To mySheet.Views.Count
Set myView = mySheet.Views.Item(i)
Set vLinks = myView.GenerativeLinks
vLinks.RemoveAllLinks
If InStr(myView.Name, "Main") < 1 Then
If InStr(myView.Name, "Background" ) < 1 Then
vLinks.AddLink myPart
End If
End If
Next
mySheet.ForceUpdate
'CATIA.ActiveDocument.Save
End Sub





RE: wrong placement of dimension in drawing after update links of part
indocti discant et ament meminisse periti
RE: wrong placement of dimension in drawing after update links of part
this is how it looks as a result
RE: wrong placement of dimension in drawing after update links of part
http://www.hostingpics.net/viewer.php?id=965360Cap...
this is how it looks as a result
http://www.hostingpics.net/viewer.php?id=749627Cap...
RE: wrong placement of dimension in drawing after update links of part
Eric is right. I believe you have to reroute dimensions.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: wrong placement of dimension in drawing after update links of part
If you have not already done this, try it. Then run the code and see if they fail.