DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Group objects and resize them via script

Solved!
Go to solution

Hello,

 

I call some different objects from my personal folder and when  I put them exact location, they reveal one big object. However, I need to resize them via on my script. However, when I resize them, their allingment according to each other is broken down at all. 

 

In my opinion, if I group all of my objects and after that I resize grouped object, I can solve the problem. (I am open to other suggestions)

 

So I can select my objects via the code below, but I cannot group and resize them.

 

Dim oMyReportObj, oMyReportObjects

Set oMyReportObjects = Report.ActiveSheet.Objects

For each oMyReportObj in oMyReportObjects

     Call oMyReportObj.Select()

Next

 

 

Do you have any solution/code  for the next steps?

 

Thank you.

Mehmet

0 Kudos
Message 1 of 3
(1,937 Views)
Solution
Accepted by topic author mmt1357

 

Hi Mehmet,

 

When I need to from code resize table or chart, (Assuming that the Group option does not give what is desired!) I start looking at making the report objects completely from code.

 

This can be done by in Report editor, putting mouse over the each report object, and then pressing shift-ctrl-C This will transfer to the clipboard all the commands it takes to make that report object.  This option is more detailed than using copy to script that can execute if hover over a report object and right click, and select "Copy as script"

 

You can do this to each of your report objects, and then make functions/subs that will vary the parameters you require to change position or values in object.

 

Paul

 

 

0 Kudos
Message 2 of 3
(1,872 Views)

Thank you. I did as you said.

0 Kudos
Message 3 of 3
(1,829 Views)