Can anyone help me find the iProperty for the sheet rev #, It,s available in the sheet in the drop down under sheet properties, however I cant seem to find it in the iLogic Rule Editor
Example snippet from the routine:
SyntaxEditor Code Snippet
'get the revision number of the current document from the iproperties oRevNum = iProperties.Value("Project", "Revision Number") oSheet = ActiveSheet.Sheet
This works fine for the "Project" rev# but I need the "Sheet" rev #
Hello,
If I understand correctly, you mean the revision property in the Edit Sheet dialog right?
if so, this property seems to be unavailable for the Inventor API (and also in iLogic since it also uses the API)
it should be in the Sheet object, there is for example the get_Orientation, get_ExcludeFromCount, get_ExcludeFromPrinting ...
but the revision is missing for some reason
~peter
Hi
I that case, are you able to move to single sheet drawings?
I personally find that the benefits of single sheet drawings far outweigh the benefits of multi sheet drawings. (I use 'non printable'/blank sheets, to pad my drawings, to simulate a multi sheet drawing.)
One use...
Snippet from my code to Attach the Rev to the PDF print.
------ snippet ----
oRevNum = iProperties.Value("Project", "Revision Number")
oDataMediumPDF.FileName =oFolder + "\" + oFileName & "[" & oRevNum & "]" & ".pdf"
---- End ----
I agree but I am being pressured to use multiple sheet drawings by our drafting department who are writing this into their std. So a solution is still needed. thanks for your thoughts.
I would strongly push your drafting department not to use the sheet revision. As you are finding out it isn't available to the API. More importantly if you ever go to Vault you will not be able to map in this sheet revision to the Vault properties.
I am currently struggling with that now and having to hand edit over a thousand drawings to correct the old title block to look at the Inventor iproperty revision, and not the sheet property revision.
Here is a little code snippet that will look for a text box called <Sheet Revision> and then read the value in it and write it to a custom iproperty. You will have to tweak it to write to that text box or by issuing a create command at a given X, Y coordinate you can make your own.
Dim oDrawDoc As Inventor.DrawingDocument = ThisApplication.ActiveDocument ActiveSheet = ThisDrawing.Sheet("Sheet:1") x = 1 Dim oTxtBox As Inventor.TextBox Dim oRev As String Dim oTitleblock As Inventor.TitleBlock = oDrawDoc.ActiveSheet.TitleBlock For Each oTxtBox In oDrawDoc.ActiveSheet.TitleBlock.Definition.Sketch.TextBoxes If oTxtBox.Text = "<Sheet Revision>" Then oRev=oTitleBlock.GetResultText(oTxtBox) iProperties.Value("Custom", "Sheet Revision")= oRev 'MessageBox.Show("Found sheet Revision", oRev) End If x += 1 Next
Can't find what you're looking for? Ask the community or share your knowledge.