Message 1 of 23
		
    
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report
 
Hello together,
i have a problem with Title Blocks, i like to change the titleblock in all sheets via iLogic. With this code it only changes in the active sheet.
My script is the following (By the way, i do nothing know about iLogic, i just copy together...):
Thank you very much
Regards Martin
ActiveSheet.TitleBlock = "ET-Liste Deutsch"
Dim openDoc As Document
openDoc = ThisDoc.Document
 
'Dim docFile As Document
 
If openDoc.DocumentType = 12292 Then
 
    'Look For the model referenced within the drawing. End the Rule If the drawing Is empty.
    Dim MDocFile As Document
    If ThisDoc.ModelDocument IsNot Nothing Then
         MDocFile = ThisDoc.ModelDocument
         Else
         MessageBox.Show("Diese Option ist in einer leeren Zeichnung unzulässig", "Export error")
         Return
    End If
    
    'assumes a drawing document is active.
    Dim oDrawDoc As DrawingDocument
    oDrawDoc = ThisApplication.ActiveDocument
        
    'Set a reference to the active sheet.
    Dim oSheet As Sheet
    oSheet = oDrawDoc.ActiveSheet
    'Look for partlist within drawing. End rule, if it doesn't exist.
    'say there is a Partslist on the sheet.
    Dim oPartslist As PartsList
    oPartslist = oSheet.PartsLists(1)
 
    If oSheet.PartsLists(1) IsNot Nothing Then
 
        'set parts list to a specific style
        oPartsList.Style = oDrawDoc.StylesManager.PartsListStyles.Item("KV-Stueli_Deutsch")
		ThisDrawing.Document.StylesManager.Layers("KV deutsch").Visible= True
		ThisDrawing.Document.StylesManager.Layers("KV englisch").Visible= False
 
     End If
        
        
    Else
    MessageBox.Show("Es muss eine IDW offen sein um den Code zu verwenden!", "File Type Mismatch!")
    
End If
					
				
			
			
				
			
			
				Solved! Go to Solution.