Reset view lables

Reset view lables

sschulteH6WZ3
Advocate Advocate
2,375 Views
12 Replies
Message 1 of 13

Reset view lables

sschulteH6WZ3
Advocate
Advocate

Hi all, have the programmers of Inventor seen their way to allow view letter \ number reset with out going through a bunch of time wasting gymnastics? I have seen people complaining about this on here since 08. 

2,376 Views
12 Replies
Replies (12)
Message 2 of 13

CGBenner
Community Manager
Community Manager

@sschulteH6WZ3 

 

Can you please give a little more detail, or an example of what you'd like to be able to do?

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!


Chris Benner
Community Manager

0 Likes
Message 3 of 13

johnsonshiue
Community Manager
Community Manager

Hi! I believe you are talking about A, B, C view indices, right. Indeed, there isn't much you can configure. You can exclude certain letters in the active standard. But, you cannot reset the sequence. It seems to persist on a per file basis. If you want to reset it, you can copy the sheets from one idw/dwg and paste it to a new idw/dwg.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 4 of 13

sschulteH6WZ3
Advocate
Advocate

Ok I figured no one has got around to figuring out how to do it yet if they are even trying.

Message 5 of 13

Curtis_Waguespack
Consultant
Consultant

Hi @sschulteH6WZ3 

 

Here is an iLogic rule that I had on hand or this... it has a few options built in that might fit your needs, but if you need help modifying it further, you might start a new thread on the Inventor Customization forum with some details and/or examples.


http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

 

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

 

Sub Main()

Logger.Info(" ")
Logger.Info("RuleName: " & iLogicVb.RuleName)

'Re-numbers all view labels on all sheets
'	handles aplha or numeric
'	option to set all to aplha
'	option to set all to Numeric
'	option to set only details and sections to alpha


oScheme = "Numeric w/ details and sections as Alpha"
'oScheme = "All Numeric"
'oScheme = "All Alpha"

Dim oDoc As DrawingDocument
Dim oSheet As Sheet
Dim oView As DrawingView

'check if active document is a drawing
If ThisApplication.ActiveDocument.DocumentType <> kDrawingDocumentObject Then
	Exit Sub
End If

oDoc = ThisApplication.ActiveDocument

i = 9
k = 1
'Rename view identifiers 
'look at all sheets
For Each oSheet In oDoc.Sheets
	'look at all views on sheet
	For Each oView In oSheet.DrawingViews

		'renumber only detail and section
		If oScheme = "All Numeric" Then
			oView.Name = i
			i = i + 1
		ElseIf oScheme = "All Alpha" Then
			oView.Name = num2Letter(i)
			i = i + 1

		Else If oScheme = "Numeric w/ details and sections as Alpha" Then

			If oView.ViewType = DrawingViewTypeEnum.kSectionDrawingViewType Or _
				oView.ViewType = DrawingViewTypeEnum.kDetailDrawingViewType Then
				oView.Name = num2Letter(i)
				
				'skip I, O, & Q
				If InStr(1, num2Letter(i), "I") > 0 Or _
					InStr(1, num2Letter(i), "O") > 0 Or _
					InStr(1, num2Letter(i), "Q") > 0 Then
					i = i + 1
					oView.Name = num2Letter(i)
				End If
				
				i = i + 1
			Else
				oView.Name = k
				k = k + 1
			End If
		End If
	Next oView
Next oSheet

End Sub

Public Function num2Letter(num As Long) As String
	'converts long to corresponding alpha
	'Ex. 1 = A, 28 = AB

	remain = num Mod 26
	whole = Fix(num / 26)

	If num < 27 Then
		If remain = 0 Then
			num2Letter = "Z"
		Else
			num2Letter = Chr(remain + 64)
		End If
	Else
		If remain = 0 Then
			num2Letter = Chr(whole + 63) & "Z"
		Else
			num2Letter = Chr(whole + 64) & Chr(remain + 64)
		End If
	End If
End Function

 

EESignature

Message 6 of 13

tobias
Collaborator
Collaborator

@Curtis_Waguespack,

 

The code, as it is, goes through all the views and I can't get it to work for only detail and section views.

Can you help, please ?

 

 

Tobias
The Netherlands
Inventor Pro 2026, Vault Pro 2026, AutoCad Electrical 2026.

If a response answers your question, please use ACCEPT SOLUTION to assist other users later.
0 Likes
Message 7 of 13

Curtis_Waguespack
Consultant
Consultant

Hi @tobias 

It's been a while since I looked at this, but it appears that this should work if you have this line uncommented.


Are you seeing something different?

Curtis_Waguespack_1-1694706715467.png

 

 

EESignature

Message 8 of 13

tobias
Collaborator
Collaborator

Thanks. In my drawing it will still start labelling the normal views.

So the first View label I see is "C" instead of "A" on an auxiliary view.

 

Tobias
The Netherlands
Inventor Pro 2026, Vault Pro 2026, AutoCad Electrical 2026.

If a response answers your question, please use ACCEPT SOLUTION to assist other users later.
Message 9 of 13

will.astill
Advocate
Advocate

Hi, Does this just rename the views, or does it correct the view counter in the drawing so that new views are added starting at view 1?

0 Likes
Message 10 of 13

tobias
Collaborator
Collaborator

Hi @will.astill,

 

It is "just" renaming the views.

 

 

Tobias
The Netherlands
Inventor Pro 2026, Vault Pro 2026, AutoCad Electrical 2026.

If a response answers your question, please use ACCEPT SOLUTION to assist other users later.
Message 11 of 13

will.astill
Advocate
Advocate

Sorry Tobias. I didn't mean to belittle the solution with the "just". I had followed a link here looking for a solution for resetting view numbering in my template and was trying to confirm that it didn't do what I needed.

 

Appreciate the effort to create the iLogic and to share it and that nothing "just" does anything without hard work.

Message 12 of 13

yafet_zeraiFY84S
Explorer
Explorer

I changed this parameter and it worked for me,

@Curtis_Waguespack  thank you for the solution!

inventor ilogic renaming .png

 

0 Likes
Message 13 of 13

Bellmer-CAD-Admin
Enthusiast
Enthusiast

It would be nice to get some feedback from Autodesk on why Inventor behaves this way. Is there a requirement from many companies that the letter of a deleted view (section or detail) may no longer be used?

It makes absolutely no sense to us, and it would at least be nice if it were possible to set it so that ‘freed’ letters are automatically reused.

0 Likes