• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

search ipt as hidden

  • Thread starter Thread starter and
  • Start date Start date
Good question...
I would do so:
distinct inventor components - they place me on "model data"
touch the first row shift pressed and touch last line - dx key expand all levels derived
must be present as column "different structure"
in this way having everything "exploded" you can see what is "hidden"
Immagine.png
 
and if one wants to shake ilogic?
since the aid has more than 2000 components!!
Of course, if you're making demands of this guy, you must have a nice mix of the technical archive. .
However I abandon because there are very prepared chalogers gurus who will help you

edit:
with the procedure that I mentioned above, once exploded all the distinct, selecting all rows - dx copy button and paste into an excel file. then in the column "different structure" imposed filter and activate only the hidden.
 
Last edited by a moderator:
Something like that
Code:
    dim oassy as assemblydocument = thisdoc.document
    dim opart as partdocument
    dim osubdoc as document
    
    for each osubdoc in oassy.allreferenceddocuments
        if osubdoc.documenttype = inventor.documenttypeenum.kpartdocumentobject then
            opart = osubdoc
                ' ogni bomstructure ha un valore diverso
                ' nascosto = 51971

                messagebox.show(opart.displayname & " " & opart.componentdefinition.bomstructure)
        end if
    next
 
I personally took the habit of checking the type of active document to avoid runtime errors.@catcher You didn't give the enumerator to the bomstructure, is there a reason?

if someone is interested, reference to enumerators bombing
 
Last edited:
Something like that
Code:
    dim oassy as assemblydocument = thisdoc.document
    dim opart as partdocument
    dim osubdoc as document
   
    for each osubdoc in oassy.allreferenceddocuments
        if osubdoc.documenttype = inventor.documenttypeenum.kpartdocumentobject then
            opart = osubdoc
                ' ogni bomstructure ha un valore diverso
                ' nascosto = 51971

                messagebox.show(opart.displayname & " " & opart.componentdefinition.bomstructure)
        end if
    next
and possible a list... and not a message every part found!
 
I personally took the habit of checking the type of active document to avoid runtime errors.@catcher You didn't give the enumerator to the bomstructure, is there a reason?

if someone is interested, reference to enumerators bombing
to make it quick because I don't even have time to breathe;)
 
and possible a list... and not a message every part found!
Yes.

if instead the question is: "Someone makes me the piece of code? ":
  1. as far as I am concerned, see answer above
  2. He explains right away what you want so that those who decide to engage in things don't find themselves doing things again. . .
  3. the answer of peppe for a job once in a while is absolutely functional, otherwise you return to point 2)
 
Yes.

if instead the question is: "Someone makes me the piece of code? ":
  1. as far as I am concerned, see answer above
  2. He explains right away what you want so that those who decide to engage in things don't find themselves doing things again. . .
  3. the answer of peppe for a job once in a while is absolutely functional, otherwise you return to point 2)
Sorry, you're perfectly right.
I know little ilogic,
and I'd need a little program that checks all those .ipts that are "hidden", and gives me how to output the list of these parts.... and if you could even where they are mounted in the axieme to find them then better!
Thank you.
 
@and as you asked made a small, very limited modification to the code written by @catcher to view the full list in the dialog box.
Code:
if thisapplication.activedocumenttype = kassemblydocumentobject and thisapplication.activedocument.allreferenceddocuments.count > 0 then
    dim lista as string
    dim oass as assemblydocument = thisdoc.document
    
    for each odoc as document in oass.referenceddocuments
        if odoc.documenttype = kpartdocumentobject and odoc.componentdefinition.bomstructure = inventor.bomstructureenum.kphantombomstructure then
            lista = lista & vblf & odoc.displayname & " ||--->> " & odoc.referencingdocuments(1).fullfilename
        end if
    next
    messagebox.show(lista,"lista")
else
    messagebox.show("devi essere in un assieme per esportare la lista materiali (bom)", "ilogic export")
end if
If the list is very long, with a small change of code, I suggest you save it in a csv or text file.
 
@and as you asked made a small, very limited modification to the code written by @catcher to view the full list in the dialog box.
Code:
if thisapplication.activedocumenttype = kassemblydocumentobject and thisapplication.activedocument.allreferenceddocuments.count > 0 then
    dim lista as string
    dim oass as assemblydocument = thisdoc.document
   
    for each odoc as document in oass.referenceddocuments
        if odoc.documenttype = kpartdocumentobject and odoc.componentdefinition.bomstructure = inventor.bomstructureenum.kphantombomstructure then
            lista = lista & vblf & odoc.displayname & " ||--->> " & odoc.referencingdocuments(1).fullfilename
        end if
    next
    messagebox.show(lista,"lista")
else
    messagebox.show("devi essere in un assieme per esportare la lista materiali (bom)", "ilogic export")
end if
If the list is very long, with a small change of code, I suggest you save it in a csv or text file.
where I'm wrong... that only an empty window appears to me with "list" and "ok" button... but nothing happens?
 
:oops: @and you are right, in the "pasticcia" the original code I wrote "referenceddocuments" instead of "allreferenceddocuments" (as in the original code of @catcher )

Sorry sorry
 
....perfect now works.... can you also have the change to save the results file in excel?
:oops: @and you are right, in the "pasticcia" the original code I wrote "referenceddocuments" instead of "allreferenceddocuments" (as in the original code of @catcher )

sorry
 
Because it's simple this time... .
Code:
' autore        : rossano praderi
' creato        : 02/03/2024
' modificato    : 04/03/2024

const sepdisplay = " ||--->> "
const sepfile = ";"

if thisapplication.activedocumenttype = kassemblydocumentobject and thisapplication.activedocument.allreferenceddocuments.count > 0 then
    dim lista as string
    dim oass as assemblydocument = thisdoc.document
    
    for each odoc as document in oass.allreferenceddocuments
        if odoc.documenttype = kpartdocumentobject and odoc.componentdefinition.bomstructure = inventor.bomstructureenum.kphantombomstructure then
            lista = lista & vblf & odoc.displayname & sepdisplay & odoc.referencingdocuments(1).fullfilename
        end if
    next
    messagebox.show(lista,"lista")
    
    if lista.length > 0 then
        ' attenzione!!! non viene eseguito nessun controllo degli errori e il file originale (.csv) viene sempre sovrascritto
        lista = "nome;cartella padre" & vblf & lista.replace(sepdisplay,sepfile).trim() ' aggiunta intestazioni
        microsoft.visualbasic.fileio.filesystem.writealltext(thisdoc.pathandfilename(false) & ".csv", lista, false)
    end if
else
    messagebox.show("devi essere in un assieme per esportare la lista materiali (bom)", "ilogic export")
end if
 
Because it's simple this time... .
Code:
' autore        : rossano praderi
' creato        : 02/03/2024
' modificato    : 04/03/2024

const sepdisplay = " ||--->> "
const sepfile = ";"

if thisapplication.activedocumenttype = kassemblydocumentobject and thisapplication.activedocument.allreferenceddocuments.count > 0 then
    dim lista as string
    dim oass as assemblydocument = thisdoc.document
   
    for each odoc as document in oass.allreferenceddocuments
        if odoc.documenttype = kpartdocumentobject and odoc.componentdefinition.bomstructure = inventor.bomstructureenum.kphantombomstructure then
            lista = lista & vblf & odoc.displayname & sepdisplay & odoc.referencingdocuments(1).fullfilename
        end if
    next
    messagebox.show(lista,"lista")
   
    if lista.length > 0 then
        ' attenzione!!! non viene eseguito nessun controllo degli errori e il file originale (.csv) viene sempre sovrascritto
        lista = "nome;cartella padre" & vblf & lista.replace(sepdisplay,sepfile).trim() ' aggiunta intestazioni
        microsoft.visualbasic.fileio.filesystem.writealltext(thisdoc.pathandfilename(false) & ".csv", lista, false)
    end if
else
    messagebox.show("devi essere in un assieme per esportare la lista materiali (bom)", "ilogic export")
end if
But how do I save the excel file? ? ?
 
code creates a file. csv in the active document folder, with the same active document name but with extension.csv

try opening the file with excel.
 
code creates a file. csv in the active document folder, with the same active document name but with extension.csv

try opening the file with excel.
today gives me this mistake on a group:

reference to an object not set to an object instance.

What is it?
 
difficult to say a priori, you need more information to find the problem.
is a generic(exception) error that is generated for different causes, can you make a screenshot of the error message?

Can you tell me about how many documents the axieme is (10, 100, 1000, ...)?
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top