04-12-2022
10:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-12-2022
10:15 AM
I changed my code for this:
Dim myList, mySelect As New ArrayList
Dim Instalacao
TolMax = InputBox("Qual a tolerância superior do diâmetro de passagem do parafuso?", "Tolerância Superior")
TolMin = InputBox("Qual a tolerância superior do diâmetro de passagem do parafuso?", "Tolerância Superior")
myList.Add("Cemented")
myList.Add("Screwed")
myList.Add("N/A")
myList_selected = InputListBox("Cimentado, Parafusado ou N/A?", myList, myList(0), Title := "Selecione abaixo", ListName := "List")
mySelect.Add(myList_selected)
For Each Instalacao In mySelect
' MessageBox.Show("Arquivo .txt gerado com sucesso! Todos os itens foram definidos como: " & Instalacao, "Sucesso!")
Next
oWrite = System.IO.File.CreateText(ThisDoc.Path & "\" & "VerificarConexoes" & ".txt")
Dim oDoc As Inventor.Document
For Each oDoc In ThisApplication.Documents.VisibleDocuments
If oDoc.DocumentType = kAssemblyDocumentObject Then
item = iProperties.Value("Project", "Part Number")
A = Parameter("Ap")
Emax = Parameter("DIA") + TolMax
Emin = Parameter("DIA") - TolMin
B = Parameter("B")
oWrite.WriteLine(item & ";" & Round(A, 2) & ";" & Round(B, 2) & ";" & Round(Emax, 2) & ";" & Round(Emin, 2) & ";" & Instalacao)
End If
Next
oWrite.Close()
But still not working. The .txt file that is exporting returns just the infos from the assembly that are visible repeating for all documents opened, as below: