News:

Happy New Year!

Main Menu

Bounding box - how to refresh?

Started by danielj, October 02, 2024, 05:03:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

danielj

I've created a master, the bounding box is correct:


The master has a macro where it will copy-and-paste the narrower box ('terminal') X times, and then adjust the width of the larger box ('outer'):


The pasted 'terminal' shapes are pasted into the overall group that contains the outer shape and the original terminal shapes:


After the macro runs, the outer bounding box of the original shape doesn't update, it stays the original size.


How can I either manually adjust the bounding box or programmatically adjust it?  I'm assuming there's a shape sheet cell somewhere, but I can't seem to find it.

Surrogate

#1
Quote from: danielj on October 02, 2024, 05:03:05 PMHow can I either manually adjust the bounding box or programmatically adjust it? 
Please try DOCMD method.
visCmdAlignBox - 1768
In this table you can find list of arguments.
https://surrogate-tm.github.io/surrogate/DOCMD.htm

Nikolay

If you want to adjust manually, use "Update Alignment Box" command on the toolbar:

Developer ⇒ Operations ⇒ Update Alignment Box


Surrogate

#3
Quote from: Surrogate on October 02, 2024, 07:40:24 PMvisCmdAlignBox - 1768
My bad!
Quote from: Nikolay on October 02, 2024, 10:30:28 PMDeveloper ⇒ Operations ⇒ Update Alignment Box
This way works! I just start macro-recorder and do these steps, for get some code.
My steps for create attached example:
1. Create sub-routine in ThisDocument module
Sub tst(sh As Shape)
ActiveWindow.Selection.UpdateAlignmentBox
End Sub
2. Add to group shape Actions section, and row.
Fill cells Menu and Action like this


For start update this box select shape, click right mouse button and select first row (Test) in pop-up context menu


danielj


Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 252 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1103KB.
Tokens: post-login.
Cache hits: 13: 0.00162s for 26,543 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]