Reply

Estrazione Elenco Files in Campitura

Ho un programma in vb che trova tutti i link presenti in un asm. Funziona bene tranne quando mi trovo all'interno dell'asm una campitura. Come faccio a trovare l'elenco dei files presenti in questa campitura?

Grazie

5 REPLIES

Re: Estrazione Elenco Files in Campitura

Google translated:

 

I have a program in vb that finds all the links in a asm. It works fine except when I am in a pattern of the ASM. How do I find the list of files in this pattern?

 

Can you provide some sample code and a sample .asm that you're working with? That will help us test for you.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Estrazione Elenco Files in Campitura

Questo il codice per leggere le parti:

 

Public Sub RM_ReadLinks_TEST()
Dim strPath As String
Dim rmApp As RevisionManager.Application
Dim rmDoc As RevisionManager.Document
Dim rmLinks As RevisionManager.LinkedDocuments
Dim i As Integer


strPath = "C:\TEST\iso assembly.asm"
' Creo l'oggetto RevisionManager
Set rmApp = CreateObject("RevisionManager.Application")


' Apro il file assembly
Set rmDoc = rmApp.Open(strPath)

' Trovo tutti i file collegati
Set rmLinks = rmDoc.LinkedDocuments
For i = 1 To rmLinks.Count
Debug.Print rmLinks(i).FullName
Next


' Vado al record successivo
Set rmLinks = Nothing
Set rmDoc = Nothing


Set rmApp = Nothing
Debug.Print "FINE"
End Sub

 

In allegato il file .asm.

Io mi aspetterei due ricorrenze del .par, invece ne trova solamente una.

Grazie

Re: Estrazione Elenco Files in Campitura

Thanks for the sample. I now understand the confusion.

 

First we need to define terms. There is a different between "Linked Documents" and "Occurrences". Revision Manager, and it's API, will only show you linked documents. In this case, there is only 1 "Linked Document".

 

 

If we open your .asm in Solid Edge and use Spy for Solid Edge, we can see that this .asm has 2 "Occurrences". 

 

 

So it all depends on what you're trying to accomplish. If you simply need a list of files that an .asm depends on, Revision Manager and it's API will work fine. If you're needing more detailed information about the assembly it's components, i.e. BOM report, you will need to use the full Solid Edge API. There are open source examples of both available on GitHub.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Estrazione Elenco Files in Campitura

Ottimo. Ora funziona.

Grazie Andrea

Re: Estrazione Elenco Files in Campitura

Contento di aver potuto aiutare. (Glad I could help.)

Jason Newell
Applications Architect
www.jasonnewell.net