interpart Links

 

Hi All

 

I'm new in SolidEdge Programming. Trying to establish broken links and delete them without using any interactive tools like revision manager.

I'm thinking of the following actions:

 

1. opening the file and reading information about interpart documents as shown below:

 

 

objWriter.WriteLine("")

objWriter.WriteLine("==========Linked-Doc============")

objWriter.WriteLine("")

Dim objApplication AsNew RevisionManager.Application

Dim objRmDocument As RevisionManager.Document

Dim objLinkedDocuments As RevisionManager.LinkedDocuments

Dim objLinkedDocument As RevisionManager.Document

Dim sActiveDoc AsString = objDocument.FullName

objApp.Documents.Close()

objRmDocument = objApplication.Open(sActiveDoc, , False)

objLinkedDocuments = objRmDocument.LinkedDocuments

Try

ForEach objLinkedDocument In objLinkedDocuments

Try

objWriter.WriteLine(" --> " & objLinkedDocument.FullName)

Catch ex As Exception

objWriter.WriteLine(" --> ERROR: Link in " & sActiveDoc)

EndTry

Next

Catch ex As Exception

EndTry

objWriter.WriteLine("")

objWriter.WriteLine("==========Linked-Doc============")

objWriter.WriteLine("")

 

The code basically is working but I'm missing some information.

 

Problem 1: I do get the information for the interpart links where reference exteranl files, but I do not find information about "link is broken" or "link is ok". Is there a method to get this information?

 

Problem 2: I'm not shure if I get only interpart references listed or if the list contains also all components where are used in the assembly structure. This is why I woud like to get the information/type about link/linktype

 

Problem 3: If I can not get a list of interpartlinks: Is there a way to scan the fromelements and find the information about links there?

 

Problem 4: Is there a way to determin a link where

 

Problem 5: I found th following code in the gtac:

 

Set objIPLink = objDoc.InterpartLinks

For Each objIPLink In objDoc.InterpartLinks

objIPLink.BreakLink

Next

 

Unfortunately I do not find the declaration for objIPLink, I do not find the method .InterpartLinks and I do not find the method .BreakLink. What do I have to declare/import to get this functions? (.net not VB6)

 

 

I'm looking forward to any help on this topics.

Regards

murerro

 

 

 

 

Posted by: Rolf Murer
Post date: 7/12/2011 5:13:07 AM

3 REPLIES

RE: interpart Links

Hi,

 

Problem 1: I do get the information for the interpart links where reference exteranl files, but I do not find information about "link is broken" or "link is ok". Is there a method to get this information?

 

Simply check the linked file exists or not.

 

Problem 2: I'm not shure if I get only interpart references listed or if the list contains also all components where are used in the assembly structure. This is why I woud like to get the information/type about link/linktype

 

You get a list of linked files for the top level only. Its on you to recursively traverse the structure by determining all linked files for each linked document which represents an ASM document (check the file extension of the FullName property).

 

Problem 3: If I can not get a list of interpartlinks: Is there a way to scan the fromelements and find the information about links there?

 

I don't understand your question.

 

Problem 4: Is there a way to determin a link where

 

I don't understand your question.

 

Problem 5: I found th following code in the gtac:

 

Set objIPLink = objDoc.InterpartLinks

For Each objIPLink In objDoc.InterpartLinks

objIPLink.BreakLink

Next

 

Unfortunately I do not find the declaration for objIPLink, I do not find the method .InterpartLinks and I do not find the method .BreakLink. What do I have to declare/import to get this functions? (.net not VB6)

 

 

Search the Solid Edge help file index for InterpartLink and InterpartLinks.

 

 

Posted by: Wolfgang Kunert
Post date: 7/12/2011 9:36:45 AM

RE: interpart Links

Hi,

 

Problem 1: I do get the information for the interpart links where reference exteranl files, but I do not find information about "link is broken" or "link is ok". Is there a method to get this information?

 

Simply check the linked file exists or not.

 

Problem 2: I'm not shure if I get only interpart references listed or if the list contains also all components where are used in the assembly structure. This is why I woud like to get the information/type about link/linktype

 

You get a list of linked files for the top level only. Its on you to recursively traverse the structure by determining all linked files for each linked document which represents an ASM document (check the file extension of the FullName property).

 

Problem 3: If I can not get a list of interpartlinks: Is there a way to scan the fromelements and find the information about links there?

 

I don't understand your question.

 

Problem 4: Is there a way to determin a link where

 

I don't understand your question.

 

Problem 5: I found th following code in the gtac:

 

Set objIPLink = objDoc.InterpartLinks

For Each objIPLink In objDoc.InterpartLinks

objIPLink.BreakLink

Next

 

Unfortunately I do not find the declaration for objIPLink, I do not find the method .InterpartLinks and I do not find the method .BreakLink. What do I have to declare/import to get this functions? (.net not VB6)

 

 

Search the Solid Edge help file index for InterpartLink and InterpartLinks.

 

 

Posted by: Wolfgang Kunert
Post date: 7/12/2011 9:36:46 AM

RE: interpart Links

 

 

Hi Wolfgang

 

Thanks for the reply

 

Problem 1: solved

Problem 2: ok, undestood

Problem 3: I found links where are not referenced to external files. There are also links available where reference to an internal sketch? But this link is broken. Therefore not only a check if the file exists helps on this situation. Here I should be able to check if the link is broken or not. I was expecting to scan the form elements or sketches. But I don't know how to do it. (see also attachment)

Problem 4: I had probably a leek in my brain :-) The sentence makes no sence....

Problem 5: ok, I will scan the docu.

 

Regards and many thanks

Rolf

 

 

 

Posted by: Rolf Murer
Post date: 7/17/2011 11:31:03 PM