iLogic to create batch print of pdf's from top level model incl. iParts/iAssy's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
First post on this forum, so please be gentle.
I have been immersing myself in the world of iLogic over the last few months and have created some templates and standard company rules for iLogic parts and assemblies. This forum and several others have been the backbone of any rules that I have cobbled together and I thank all the contributors for their time and expertise.
I should add that I have had some training on iLogic from CADline, but have no previous experience with iLogic or VB and as yet nobody else in my company is actively using iLogic. I consider myself a competent engineer with a limited knowledge of iLogic and an even more limited understanding of VB….but every day I am learning more from you guys.
On the whole, I have managed to achieve everything I have needed to so far, but I need to call upon your help with this problem…
I have been attempting to adapt an iLogic rule that was written by Curtis Waguespack, which outputs a pdf of every drawing referenced by a top level assembly. The rule assumes that the drawings share the same name and location as the next component.
I have adapted the code to include revision in the pdf file name and this is working well (see text file attached). The problem that I hope somebody on here may be able to help with is that when the rule encounters an iPart or iAssembly it finds the relevant drawing (in our case, iParts members are listed on a single idw as a tabulated drawing) BUT the pdf filename is not output in the format that I require. I would like the pdf filename to contain the iPart factory part name rather than the iPart member name.
I had thought that I might be able to make use of something along the lines of:
If oRefDoc.ComponentDefinition.IsiPartMember Then
oDashNo = “”
Else
oDashNo = Mid(oPartNumber,8)
End if
i.e. identify if the part or assembly is “standard” or “iPart/iAssembly” and then have the filename set according to that ‘file type’.
However, this line of code returns the following error:
Error in rule: PDF batch cascade print RMC (part number), in document: 6201266.iam
Public member 'IsiPartMember' on type 'AssemblyComponentDefinition' not found.
I assume that this is because the rule is running a loop which encounters both parts and assemblies (and assemblies do not contain iPart members)?
Can anybody advise how I might be able to identify iParts and iAssemblies so that I can derive the pdf filename that I require?
Or is there another way of approaching this?
I had considered moving away from tabulated drawings for iParts/iAssemblies and setting the drawing view to active member, but I don’t think this would work when I have an assembly containing two different iPart members from the same factory? Also, our purchasing department would prefer to have a single tabulated drawing to send to their suppliers (rather than a unique pdf for each variant).
I have attached a pdf that shows our company part numbering/idw/pdf naming convention that I would like the rule to work on for the various different inventor file types it will encounter.
Any help with this would be very much appreciated.
Richard C
Inventor 2017 64 bit, Build: 256, Release: 2017.4 Update
Windows 7