using iLogic to read latest revision date

using iLogic to read latest revision date

Anonymous
Not applicable
3,029 Views
21 Replies
Message 1 of 22

using iLogic to read latest revision date

Anonymous
Not applicable

All-

 

I've been sifting through several iLogic posts on the rev table, and I found one close - about assigning a date ... but what I want to do is read the date.

 

We have a rule to generate a PDF with the following format:  "drawing number_rev letter_pg to pgs_rev date.pdf

 

as an example - a rev d file with 3 sheets would look like this.    0070721_D_1-3_031717.pdf

date is formatted mmddyy

 

I read the drawing number from the filename, the rev from iproperties, sheet count from drawing file, and rev I was using system date.

 

the issue - we had to go back and make pdfs for files that we quick-changed- and skipped revisions, skipped initial pdf creation.  I know, bad practice ..

 

anyway - we went back and made PDF - but illogic put today's date on instead which now doesn't match when the revision was actually completed - a week or so ago.

 

how can I read the revision table to pull the latest revision date ... and grab that date as my pdf file date.

 

I was going to use last modified file property - but that changes when you save the file - and we run the pdf rule on file close.

 

thanks -

0 Likes
Accepted solutions (1)
3,030 Views
21 Replies
Replies (21)
Message 21 of 22

CarterDraws
Contributor
Contributor

@MechMachineMan - If you are still around a few years later, I have a humble request. 

 

I am fairly noobish with iLogic but can somewhat follow code in general. What I am trying to do is read the active sheet Revision Table's most recent revision date, and use that text somewhere else (as a Text Parameter in the titleblock on that Sheet). I want this to only happen per Sheet in an .idw with multiple Sheets per file. Do you think that is possible? It seems like your above codes are in service of reading the Rev Date for the pdf file naming, and I am not sure how to tweak them for what I want.

 

Right now my company's .idw template has an iLogic rule written years before me by an unknown person, which upon Document Update, changes a Custom iProperty to Today's Date. That Custom iProperty is a Text Parameter in the titleblock. So when you Save, every titleblock is populated with today's date. This is not ideal during the revision process when often not every Sheet is being affected. To be clear this current process does not involve a Revision Table at all.

 

I suspect my request may be difficult given the file-wide nature of the titleblock, but sheet-specific nature of my plan. Different .idw files we make have different numbers of sheets and I imagine creating a New Sheet in the same file could further complicate the code knowing where to place the referenced revision date?

 

Thank you for your time!

0 Likes
Message 22 of 22

Anonymous
Not applicable
So, what I would suggest, is that use the rev block, as that is easily accessible within logic and vb.net.

I briefly skimmed thru the article and would be open to discuss it with you further....tho currently I don't use inventor anymore. But, I would be willing to pull up my code and could arrange time to do a screen share if it would help.

I would definitely need to review what you're wanting to do a little more in depth to provide a better answer. But, I think the gist of it, can be done.

Fee free to reach out to me, mudmanrv at hotmail dot com. I'll see what I can do to help you out.

Cheers.

0 Likes