Drawing Sheet Numbering to start from 0

Drawing Sheet Numbering to start from 0

ben_saundersHDKKB
Participant Participant
807 Views
9 Replies
Message 1 of 10

Drawing Sheet Numbering to start from 0

ben_saundersHDKKB
Participant
Participant

Hi All,

 

I've recently been trying to get drawing sheet numbering to start from 0 instead of 1 due to the top level being a GA (0) and all other subsequent levels being piece parts (1+). Is there a way to do this automatically within the IDW drawings?

 

TIA

0 Likes
808 Views
9 Replies
Replies (9)
Message 2 of 10

WCrihfield
Mentor
Mentor

Hi @ben_saundersHDKKB.  I do not believe that would be possible.  We can rename the sheets, and reorder the sheets however we want, but the little ":1" after the sheet's name is automatic by Inventor, and we do not appear to have any control over that behavior.  Those numbers will always remain in the same order they are seen in the model browser tree, even if you move the sheets around, the numbers will correct themselves in that order.  It is fairly easy to isolate the main part of the sheet name from that number by code through, if needed.  And it is fairly easy to rename the sheets by code, but renaming them generally will not remove or change the numbering system.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 10

Curtis_Waguespack
Consultant
Consultant

Hi @ben_saundersHDKKB 

 

I think the closet you can get is to edit the GA sheet and set it to "Exclude from count"

 

This will result in GA, with no number, and the next Sheet starting at :1, as shown below.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

Curtis_Waguespack_0-1689945358510.png

 

EESignature

Message 4 of 10

ben_saundersHDKKB
Participant
Participant

Hi @Curtis_Waguespack,

 

The is the solution I had been using for the time being so it looks like I'll carry on with it. Thank you!

Message 5 of 10

WCrihfield
Mentor
Mentor

Good catch Curtis.  I forgot about that simple step since I almost never use it.

Also, just to add a note about that same functionality...it can be accessed/controlled by code too.

Sheet.ExcludeFromCount 

Sheet.ExcludeFromPrinting 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 6 of 10

ben_saundersHDKKB
Participant
Participant

Hi @WCrihfield @Curtis_Waguespack ,
I'm back on the same issue again but with a different sort of question.

I have bee using the previous suggestion of excluding the first drawing from the count and manually inputting the page number as 0. But the question i have, is there a method to input the 0 automatically using and If statement in the code?

 

Something along the lines of:

'If Sheet.ExcludeFromCount

Then Sheet Number = 0'

 

I'm no coder so i don't know how this would be phrased correctly, but would something like this be possible?

Photos attached for clarification.

Any help would be greatly appreciated. Thank you!

0 Likes
Message 7 of 10

WCrihfield
Mentor
Mentor

Hi @ben_saundersHDKKB.  You mean that you want to put a zero where there is nothing showing for the sheet number within that TextBox in your TitleBlock, on a sheet that is 'not included in the sheet count' right?  That may be possible, but may also break that 'linked' sheet number functionality represented by the <Sheet Number> FormattedText within that TextBox.  It can be pretty complicated digging into the FormattedText of drawing annotations,  because of the XML tags used within them.  It may be simpler to just create an alternate TitleBlockDefinition, in which that <Sheet Number> portion of that one TextBox is not included, and maybe a static zero ("0") is included instead, just for these occasions.  If your TitleBlock does not include any 'PromptedEntries' then it would be as simple as replacing one TitleBlock with another to achieve this goal.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 8 of 10

WCrihfield
Mentor
Mentor

Hi @ben_saundersHDKKB.  As a quick test, I created a simple new GeneralNote in one of my drawings, then injected a link to the drawing's Part Number, " - ", a link to the drawing's Stock Number, " - ", and a link to the Sheet Number, similar to how the TextBox in your TitleBlockDefinition is set-up.  Then I wrote a small iLogic rule which allowed me to 'Pick' that GeneralNote, and replace the <Sheet Number> portion of its FormattedText, with a "0" (zero).  It worked just fine.

 

Dim oObj = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingNoteFilter, "Pick a GeneralNote.")
If oObj Is Nothing OrElse (TypeOf oObj Is Inventor.GeneralNote = False) Then Return
Dim oGN As Inventor.GeneralNote = oObj
'Logger.Info("Text = " & oGN.Text & vbCrLf & "FormattedText = " & oGN.FormattedText)
Dim sTextToFind As String = "<DerivedProperty DerivedID='29704'>Sheet Number</DerivedProperty>"
If oGN.FormattedText.Contains(sTextToFind) Then
	Logger.Info("Contains the text we are looking for = True")
	oGN.FormattedText = oGN.FormattedText.Replace(sTextToFind, "0")
Else
	Logger.Info("Contains the text we are looking for = False")
End If

 

However, keep in mind that in your case, you would be editing the 'definition' of your TitleBlock, which may effect the TitleBlocks on the other sheets, whose TitleBlocks may be based on the same TitleBlockDefinition.  That is why I suggest at least having a copy of your original TitleBlockDefinition available, incase editing the contents of the TextBox changes the definition, or maybe just creating an alternate TitleBlockDefinition the way you want it for those types of sheets.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 9 of 10

gpettaU46H9
Observer
Observer

Is there a way to have the sheet count insert a (0) before the sheet number? Example: 01 . Our drawing page numbering format is typically XX.XX.01... 

0 Likes
Message 10 of 10

CampoVerde01
Advocate
Advocate

I guess you can just use text for that. We use it like this: <Document number>-0<Sheet Number> .

 

Cheers

0 Likes