cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Delete unused pens 2

SOLVED
Highlighted

Re: Delete unused pens 2

Hello Francis Paille

I think This would help you,

Macro Delete_Other_then_standard_pen

Define pen1 as String
Define pen2 as String
Define pen3 as String
Define pen4 as String
Define pen5 as String
Define pen6 as String
Define pen7 as String
Define pen8 as String
Define pen9 as String
Define pen10 as String
Define pen11 as String
Define pen12 as String
Define pen13 as String
Define pen14 as String
Define pen15 as String
Define pen16 as String

pen1 = "Thick"
pen2 = "Medium"
pen3 = "Thin"
pen4 = "Center line"
pen5 = ".004"
pen6 = ".024"
pen7 = "fleche>"
pen8 = "fleche"
pen9 = "flefleche"
pen10 = "pointeur"
pen11 = "pointiller"
pen12 = "frames"
pen13 = "wh004"
pen14 = "wh008"
pen15 = "Fantome"
pen16 = "Center Line 2"



Define pen_count as integer
pen_count = ActiveDoc.PenCount
Define delete_pen as string
Define n as integer
Define i as integer

n = (pen_count + 4)

For i = 1 to n
delete_pen = ActiveDoc.Pens[pen_count].Name
if (delete_pen = pen16) Then
Else
If (delete_pen = pen15) Then
Else
If (delete_pen = pen14) Then
Else
If (delete_pen = pen13) Then
Else
If (delete_pen = pen12) Then
Else
If (delete_pen = pen11) Then
Else
If (delete_pen = pen10) Then
Else
If (delete_pen = pen9) Then
Else
If (delete_pen = pen8) Then
Else
If (delete_pen = pen7) Then
Else
If (delete_pen = pen6) Then
Else
If (delete_pen = pen5) Then
Else
If (delete_pen = pen4) Then
Else
If (delete_pen = pen3) Then
Else
If (delete_pen = pen2) Then
Else
If (delete_pen = pen1) Then
Else
Select if Pen is equal to delete_pen
Set active pen "No pen"
Delete pen delete_pen
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
pen_count = ActiveDoc.PenCount
End For
End Macro

Note: If any eny element is available in the non-standard pens, it will be moved to "No pen"

Highlighted

Re: Delete unused pens 2

Thanks Vaduga,

It is exactly want a was seaching for. I just change the the non standard pen switch to .004 for my personal use, it is more convenient.

I big thumbs up for you!!!

I appreciate a lot your help!

Announcements