I need to place one image in each artboard.
illus_app.ActiveDocument.Artboards.SetActiveArtboardIndex(1)
thisPlacedItem.File = "D:\test1.eps"
thisPlacedItem.Top = myDocument.height / 2 + thisPlacedItem.Height / 2
thisPlacedItem.Left = myDocument.width / 2 - thisPlacedItem.Width / 2
illus_app.ActiveDocument.Artboards.SetActiveArtboardIndex(2)
thisPlacedItem = illus_app.ActiveDocument.PlacedItems().Add
thisPlacedItem.Selected = True
thisPlacedItem.File = "D:\test2.eps"
How to calculate the top and left coordinates to place the image in the centre of artboard 2 and subsequent artboards. regards, Sashi
get the bounds of each artboard using ArtboardRect property. Then use simple math (left+(right-left)/2) to get the center x position for example. Same for center y position.
then pass this [x,y] position to the Document.ActiveView.CenterPoint property. Now you're ready to place your image, it will go right in the center of the artboard.
North America
Europe, Middle East and Africa
Asia Pacific