Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sheet Names

27 REPLIES 27
SOLVED
Reply
Message 1 of 28
Anonymous
6443 Views, 27 Replies

Sheet Names

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?

27 REPLIES 27
Message 21 of 28
bpgronhoff
in reply to: Anonymous

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
in reply to: HermJan.Otterman

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

 

Message 23 of 28
HermJan.Otterman
in reply to: kkikon

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


Message 24 of 28
Anonymous
in reply to: HermJan.Otterman

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

Message 25 of 28
Anonymous
in reply to: HermJan.Otterman

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

Message 26 of 28
NachitoMax
in reply to: Anonymous

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 Programmer (C#, VB.Net / iLogic)


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.


Message 27 of 28
HermJan.Otterman
in reply to: Anonymous

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


Message 28 of 28
t.adkins
in reply to: HermJan.Otterman

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

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report