NewArtBoardBounds(2) = AdobeIll.GeometricBounds(2) NewArtBoardBounds(1) = AdobeIll.GeometricBounds(1) NewArtBoardBounds(0) = AdobeIll.GeometricBounds(0) 'Setup new artboard bounds to match artwork's bounds: 'See what initial settings are: NO PROBLEMS HERE, WORKS FINEĭebug.Print("To start with, artboard bounds are:")ĭebug.Print(AdobeIll.Artboards(1).ArtboardRect(0))ĭebug.Print(AdobeIll.Artboards(1).ArtboardRect(1))ĭebug.Print(AdobeIll.Artboards(1).ArtboardRect(2))ĭebug.Print(AdobeIll.Artboards(1).ArtboardRect(3))ĭebug.Print("To start with geometric bounds are:") Private Sub ArtboardToArtwork_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Public Shared app As Illustrator.Application Public Shared NewArtBoardBounds(0 To 3) As Double ![]() I've finally got rid of the errors, but something odd still happens: two coordinates don't get set, and the other two end up as nonsense values: So is it really an array? With 4 elements or 5? What type are the values?Īny help would be much appreciated, since Illustrator has no quick way to resize the artboard to the drawing object bounds (click Artboard tool, pull down drop down from toolbar, choose Fit Artboard to Artwork Bounds, zzzz) - and yet this is something I (and lots of others) need to do to every single drawing before importing it to FrameMaker. The Rect class is an array with integer indexes whose values represent the left, right, top and bottom properties of a rectangle. The ExtendScript Object model viewer says only this: However, I cannot work out whether ArtBoardRect is simply an array of four values (doubles probably) or a structure, etc. Var myVisibleBounds = ĭ = myVisibleBounds From another thread, it appears easy in Javascript, using: Whatever I try, I always get a meaingless 'exception' message back from VB :-). I am desperately trying to get VB.net to set the ArtboardRect property so I can automate the resizing of the artboard to fit the artwork.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |