I created a tool, which helps me to translate text in draft document to a different language. I use custom properties for the texts, which need to be translated and it works just fine... but after modifying the custom properties, I also need to update the views with "Update views"-button to update all the mapped values in the draft document.
How could it be done with vb.NET? I have tried following:
Sub UpdateViews() Dim objApp As SolidEdgeFramework.Application = Nothing Dim objDocuments As SolidEdgeFramework.Documents = Nothing Dim objDraft As SolidEdgeDraft.DraftDocument = Nothing Dim objModelLinks As SolidEdgeDraft.ModelLinks = Nothing Dim objModelLink As SolidEdgeDraft.ModelLink = Nothing Dim i As Integer Try objApp = Marshal.GetActiveObject("SolidEdge.Application") objdocuments = objApp.Documents objDraft = objApp.ActiveDocument objModelLinks = objDraft.ModelLinks
For i = 1 To objModelLinks.Count objModelLink = objModelLinks.Item(i) objModelLink.UpdateViews() Next Catch ex As Exception Console.WriteLine(ex.Message) MsgBox("Kuvantojen päivitys ei onnistunut.") End Try
This does update the views, but it doesn't update the callouts if the content of the callout hasn't change. Could someone help me? Thanks.
Posted by: Janne Heinonen Post date: 2/2/2012 8:23:50 AM