Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Find idw for ipt

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
378 Views, 7 Replies

Find idw for ipt

Anonymous
Not applicable
Is there a way to find which idw files are created using an ipt?

I need to find the files that idw files that reference the current ipt.

Thank you
0 Likes

Find idw for ipt

Is there a way to find which idw files are created using an ipt?

I need to find the files that idw files that reference the current ipt.

Thank you
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
I wrote that in a hurry, what I said does not sound very well.

How can I find for a known part all the additional files (.idw, .dwg) that are created based on that part.
0 Likes

I wrote that in a hurry, what I said does not sound very well.

How can I find for a known part all the additional files (.idw, .dwg) that are created based on that part.
Message 3 of 8
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

Have you tried the 'Where Used' functionality in
Design Assistant?

 

Sanjay-
0 Likes


Have you tried the 'Where Used' functionality in
Design Assistant?

 

Sanjay-
Message 4 of 8
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

I see that 'Where used' works very good when used from the Inventor application.

But I have problems when using it from code. The FindWhereUsed method can be used from a document and searches only within that document. Instead the 'Where used' functionality from Inventor searches through a path. And of course from inventor I get the dwg and idw files, from code I do not. How can I get to the same function?


Thank you

0 Likes

I see that 'Where used' works very good when used from the Inventor application.

But I have problems when using it from code. The FindWhereUsed method can be used from a document and searches only within that document. Instead the 'Where used' functionality from Inventor searches through a path. And of course from inventor I get the dwg and idw files, from code I do not. How can I get to the same function?


Thank you

Message 5 of 8
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

There isn't a direct API that will give you this
information. The FindWhereUsed API method is not the equivalent of the 'Where
Used' command. The command is in fact based on the API, but does a brute force
search by opening all documents in the specified folder(s) and checking whether
there are any references to the document of interest. You'll have to do this as
well. i.e. open every document within a folder and use the
Document.ReferencedDocumentDescriptors property to perform this check. Open the
documents invisibly to speed up the process.

 

Sanjay-
0 Likes


There isn't a direct API that will give you this
information. The FindWhereUsed API method is not the equivalent of the 'Where
Used' command. The command is in fact based on the API, but does a brute force
search by opening all documents in the specified folder(s) and checking whether
there are any references to the document of interest. You'll have to do this as
well. i.e. open every document within a folder and use the
Document.ReferencedDocumentDescriptors property to perform this check. Open the
documents invisibly to speed up the process.

 

Sanjay-
Message 6 of 8
robmatthews
in reply to: Anonymous

robmatthews
Collaborator
Collaborator
I have bodged together some code to do this; a macro run from Excel that looks at the currently active file in inventor and searches (via apprentrice) thru all idw files within my working folder (all files live locally, in one folder) to find the reference file.



I have no doubt that I've done it very badly (both programmatically and syntactically, as well as any other criteria you might name), but it works. However, it returns ALL idws that reference the open part or assy, and not just the immediate idw.



It does not search thru inventor dwgs.



I dare say someone like Sanjay or Josh could clean it up to run very sweetly.



I also have included a little progress indicator.






This place is not letting me attach a 4kb zip file. Wish i could help...
=============================================
This is my signature, not part of my post.
0 Likes

I have bodged together some code to do this; a macro run from Excel that looks at the currently active file in inventor and searches (via apprentrice) thru all idw files within my working folder (all files live locally, in one folder) to find the reference file.



I have no doubt that I've done it very badly (both programmatically and syntactically, as well as any other criteria you might name), but it works. However, it returns ALL idws that reference the open part or assy, and not just the immediate idw.



It does not search thru inventor dwgs.



I dare say someone like Sanjay or Josh could clean it up to run very sweetly.



I also have included a little progress indicator.






This place is not letting me attach a 4kb zip file. Wish i could help...
=============================================
This is my signature, not part of my post.
Message 7 of 8
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
Sanjay, since I have written the last message I have gotten to the same brute force solution - opening all idw and dwg files and searching through references. As I see this is the general way to do this even if it is not very optimal. The fact the the Inventor Application does the same when using "Where Used" makes me even more convinced that is no other pretty way.

RobMatthews that would be good for all fighting with this problem, if you can post your sample.

Have a nice day
0 Likes

Sanjay, since I have written the last message I have gotten to the same brute force solution - opening all idw and dwg files and searching through references. As I see this is the general way to do this even if it is not very optimal. The fact the the Inventor Application does the same when using "Where Used" makes me even more convinced that is no other pretty way.

RobMatthews that would be good for all fighting with this problem, if you can post your sample.

Have a nice day
Message 8 of 8
robmatthews
in reply to: Anonymous

robmatthews
Collaborator
Collaborator
Per my previous post, attempt #4 (or so) to attach a zip file.
=============================================
This is my signature, not part of my post.
0 Likes

Per my previous post, attempt #4 (or so) to attach a zip file.
=============================================
This is my signature, not part of my post.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report