The Tool object allows you to control and to automate the behaviour of the Tool options on library and page objects. By means of such object, you can use VBScripts to create and set tools on complex library objects.
Page.ObjGetTool returns an automation object with properties corresponding to all the TOOL parameters of the first selected page object - using these properties it is possible to get or modify the parameters. Page.ObjSetTool accepts as parameter the same automation object and uses it to set all the TOOL parameters of the first selected page object.
Page.ObjGetTool returns an object referring to a copy of the selected page object TOOL parameters - this mean that modifying the properties of this automation object does NOT modify the TOOL of the page object - it is necessary to call ObjSetTool to affect in any way the TOOL parameters of the page object.
Dim objTool = page.ObjGetTool
dim str as String = ""
str = str & "XPar: " & objTool.XPar & " XSnap: " & objTool.XSnap & chr(13) & chr(10)
str = str & "YPar: " & objTool.YPar & " YSnap: " & objTool.YSnap & chr(13) & chr(10)
str = str & "WPar: " & objTool.WPar & " WSnap: " & objTool.WSnap & " WMode: " & objTool.WMode & chr(13) & chr(10)
str = str & "HPar: " & objTool.HPar & " HSnap: " & objTool.HSnap & " HMode: " & objTool.HMode & chr(13) & chr(10)
str = str & "Engrave: " & objTool.Engrave & " Clip: " & objTool.Clip & chr(13) & chr(10)
str = str & "Create: " & objTool.Create & " Link: " & objTool.Link & " Group: " & objTool.Group & chr(13) & chr(10)
str = str & "Type Id: " & objTool.TypeId & " FormatId: " & objTool.FormatId & chr(13) & chr(10)
str = str & "Article operation: " & objTool.ArticleOp & chr(13) & chr(10)
str = str & "Article link: " & objTool.ArticleLink & chr(13) & chr(10)
str = str & "Article save: " & objTool.ArticleSave & chr(13) & chr(10)
str = str & "Article select picture: " & objTool.ArticleSelectImg & chr(13) & chr(10)
MsgBox (str)
objTool.XPar=1
objTool.XSnap=True
page.ObjSetTool (objTool)