AS
Hello all, I need some help to develop a VBScript with macros for ARIS Toolset 7.1. Actually i've inserted the picture, but i can't move it cause the script is not recognizing the command to move pictures. Follow below this part of the code inside ARIS Toolset 7.1: Dim picture_left As Object Set picture_left = CurrentSheet.Pictures.Insert("C:\Program Files\ARIS7.1\script\basic\samplePic.jpg") CurrentSheet.Application.Shapes("picture_left").Select CurrentSheet.Application.Range("picture_left").Select CurrentSheet.Application.Selection.ShapeRange.IncrementLeft 0.10 CurrentSheet.Application.Selection.ShapeRange.IncrementTop -190 'CurrentSheet.Outline.AutomaticStyles = False Machine settings: OS: Windows 7 Home Premium Processor: Intel Core i3 2.13GHz Memory (RAM): 4Gb System type: 64-Bit ARIS Version: 7.1.0.478722 Local DB P.S. 1: I've already tryed the command "MoveTo" and create a new Excel Output Class (without macro), but doesn't work too. P.S. 2: This script was working fine in the ARIS Toolset 6.1.1.30317 release version, but after it was converted, this part of the code doesn't working fine anymore. Hope someone can help me. Kind regards, Andre Sales São Paulo / Brasil
Hello Andre,
you are using Excel VBA here, not Aris Basic, so my question was what has changed on the Excel end since you said this script was working fine in the ARIS Toolset 6.1?
If currentSheet is a reference to the Excel.Application.Workbook the code seems redundant to me:
CurrentSheet.Application.Shapes("picture_left").Select CurrentSheet.Application.Range("picture_left").Select CurrentSheet.Application.Selection.ShapeRange.IncrementLeft 0.10
To get a ShapeRange object it should be sufficient to name the item of the Shapes array (cf. Excel 2007 Help):
With CurrentSheet.Shapes("picture_left").Select .IncrementLeft 0.10 .IncrementTop -190 End With
Hope this helps, Martin
Hi Martin,
First of all, thanks for your help.
So, I'm debugging the code, while stopping at the "With CurrentSheet.Shapes("picture_left ").Select", that's the message that the debugger shows: the specified item was not found.
The code continues to run, but does not move the figure.
Have any other ideas?
Tks,
Andre Sales