iLogic Code to rename sheets

iLogic Code to rename sheets

Anonymous
Not applicable
592 Views
1 Reply
Message 1 of 2

iLogic Code to rename sheets

Anonymous
Not applicable

Hi,

 

I'm trying to figure out how to Rename the sheets of a drawing using iLogic. I want to have a message box open and you would enter the number of sheets you want want and the number to start those sheets at renamed at the top to E100, E101, E102, E103 (Say 4 would be erection sheets showing overall assembly) - then have the remaining sheets renamed starting at a InputBox entry number - (if 200 was input) the sheets would number 200, 201, 202,.....

 

So you would start with

Input Box - How many Erection Sheets = ?

Input Box - Erection Sheet number start = ?

then 

Rename remaining sheets - Input Box starting number - ?

 

Sheet List .png 

QTY ERECTION SHEETS.pngSTART ERECTION SHEETS.pngSTART REMAINING SHEETS.png

Any help would be appreciated greatly.

 

Thanks.

0 Likes
593 Views
1 Reply
Reply (1)
Message 2 of 2

marcin_otręba
Advisor
Advisor

Hi,

 

Maybe you can start from this. It will rename all selected sheets in your drawing with input value:

Just select some sheets in your drawing and run rule.

 

Dim odrw As DrawingDocument = ThisDoc.Document
Dim oselset As SelectSet = odrw.SelectSet
Dim osheet As Sheet
If oselset.Count <> 0 Then
	myparam = InputBox("Enter start value for renaming selected sheets", "Rename", "Default Entry")
	If IsNumeric(myparam) Then
		prefix=""
		counter = myparam
		Else
	
If  Left(myparam, 1)="E" Then
prefix="E"
		counter = Replace(myparam,"E","")
End If
		End If
For Each osheet In  oselset
	osheet.Name = prefix & counter
	counter=counter+1
Next
End If

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes