Ilogic: delete image from titleblock

Ilogic: delete image from titleblock

Anonymous
Not applicable
464 Views
1 Reply
Message 1 of 2

Ilogic: delete image from titleblock

Anonymous
Not applicable

I know it is possible to add images in the titleblock through the "Sketchimages.add" command within iLogic.

Now i am wondering if it is also possible to remove images from the titleblock through iLogic.

 

And if so, if there are multiple images within the titleblock, only deleting the ones with a given name or filepath?

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

Anonymous
Not applicable

Got this now, but its not deleting the images 😞

 

Sub DelImage()
	Dim oDoc As DrawingDocument = ThisDoc.Document
        Dim oTitleBlockDef As TitleBlockDefinition _
            = oDoc.ActiveSheet.TitleBlock.Definition
	Call oTitleBlockDef.Edit(oSketch)
	'MsgBox (oTitleBlockDef.Sketch.SketchImages.Count)
	Dim sketchNr As Integer = oTitleBlockDef.Sketch.SketchImages.Count
	For numbr As Integer = 1 To sketchNr
	'MsgBox(numbr)
	oTitleBlockDef.Sketch.SketchImages(1).Delete()
	Next

	oTitleBlockDef.ExitEdit(True)
End Sub 'DelImage
0 Likes