Sheet Names

Sheet Names

Anonymous
Not applicable
8,238 Views
27 Replies
Message 1 of 28

Sheet Names

Anonymous
Not applicable

Hello,

 

I am wanting to have my sheet names enter automatically into my titleblock, but it is not a selectable "Text Parameter" to enter.

 

I am currently using a "Prompted Entry" to produce the Page Name in the titleblock, but would like to use what I name the sheet.

 

Any way this is possible?

0 Likes
Accepted solutions (1)
8,239 Views
27 Replies
Replies (27)
Message 21 of 28

bpgronhoff
Participant
Participant

I am working on a sheet naming system, I do not want to rename the sheets since I have formatted sheets doing that, I also have some iLogic that puts it in a Note on my cover page also groups and counts them based on their name. What I need to do is get the sheet name for each of them so that I can run an "If" statement that will abbreviate it and correspond to its number on the list. I am having issues with it not changing on each page, when I run the Rule it changes all Page names to the name that the rule is ran on. Any help would be great.

Message 22 of 28

kkikon
Community Visitor
Community Visitor

Hi @HermJan.Otterman,

 

I'm trying to figure out the code that you have on this video you shared. I put the text property of sheet name as a prompted entry. When I make a 'New Sheet' it creates a new sheet with the Drawing sheet no. value that I input Eg: 000, W01, W02 etc. But this does not reflect the change on the sheet name located on the left menu bar. I want to have it done exactly just like how you showed in the video.

For Eg: "Sheet:1" can be renamed to "000" or "W01".... it should extract that information new value "000" as the sheet name right? It's not happening in my case and I wonder why?

 

kkikon_0-1617038020755.png

 

0 Likes
Message 23 of 28

HermJan.Otterman
Advisor
Advisor

did you download my drawing? in it is the iLogic code.

I think it is just the other way around.... you change the name in the browser, than you run the iLogic rule and it will change the titleblock info.....

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 24 of 28

Anonymous
Not applicable

HermJan.Otterman: How do you get the sheet number from appearing with the sheet name in the title block?

0 Likes
Message 25 of 28

Anonymous
Not applicable

HermJan.Otterman: Also, is there a trigger you can put inside the code to make it automatically run?

0 Likes
Message 26 of 28

NachoShaw
Advisor
Advisor

There isnt a native way of doing that but if you're populating your titleblock by code, you can use these

 

Get the sheet name without the number

Private Function GetSheetName(ByVal SheetName As String, ByVal Splitter As String) As String
   Return SheetName.Substring(0, SheetName.IndexOf(Splitter))
End Function

 to use

Dim GetNameOnly As String = GetSheetName(oSheet.Name, ":")

 

Get the sheet number without the name

Private Shared Function GetSheetNumber(ByVal SheetName As String, ByVal Splitter as string) As String
   Return SheetName.Substring((SheetName.IndexOf(Splitter) + 1))
End Function

 To use

Dim GetNumberOnly As String = GetSheetNumber(oSheet.Name, ":")

or

Dim GetNumberOnly As Integer = Convert.ToInt32(GetSheetNumber(oSheet.Name, ":"))

 

You could also call them inline in your current method like this but Functions are better because they are sharable with other Methods

Dim GetNumber As Integer = Convert.ToInt32(oSheet.Name.Substring((oSheet.Name.IndexOf(":") + 1))

 

Hope that helps

 

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 27 of 28

HermJan.Otterman
Advisor
Advisor

this was asked before, please read from message 13.

or try the code of MachitoMax

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 28 of 28

t.adkins
Enthusiast
Enthusiast

If I want to keep the title blocks for some sheets is there a way I can have it not delete those out and replace it with the title block that is ilogic is using.  I was thinking this might not be necessary for the other sheets with a different title block but im not sure.

tyleradkinsABM2E_0-1648680023770.png

 

0 Likes