Page Height and width setting
Answers
-
Hi,
we will add paddings to its frame:
proc p_SetGraphicArea {Width Height} {
set gframe .mainFrame.center.f3.center_frm.graphicfrm
set pinfo [pack info $gframe]
set pmaster [dict get $pinfo -in]
set pmasterH [winfo height $pmaster]
set pmasterW [winfo width $pmaster]
set padX [expr ($pmasterW-$Width)/2]
set padY [expr ($pmasterH-$Height)/2]
set padX [expr $padX<0?0:$padX]
set padY [expr $padY<0?0:$padY]
pack configure $gframe -padx $padX -pady $padY
}
0 -
Thanks @tinh
It's working fine.
If we wants to go back to original size how it can be done ?
Since while i am adding new page it is taking same size but i need again original size in new page.
Regards,
Vikas Kumar
0 -
Hello Vikas
below last line will return original size, so you can remember them and restore graphic size later
proc p_SetGraphicArea {Width Height} {
set gframe .mainFrame.center.f3.center_frm.graphicfrm
set pinfo [pack info $gframe]
set pmaster [dict get $pinfo -in]
set pmasterH [winfo height $pmaster]
set pmasterW [winfo width $pmaster]
set padX [expr ($pmasterW-$Width)/2]
set padY [expr ($pmasterH-$Height)/2]
set padX [expr $padX<0?0:$padX]
set padY [expr $padY<0?0:$padY]
pack configure $gframe -padx $padX -pady $padY
list $pmasterW $pmasterH
}
example:
# change graphic size to (200,100)
set OriginalSize [p_SetGraphicArea 200 100]
# do something with graphic image...
...
...
#change graphic size to original:
eval p_SetGraphicArea $OriginalSize
0 -
Can we do the same or can we create multiple viewport in hypermesh.
I know manually it is not possible.
Is there any tcl/tk command is there which can create multiple window in hypermesh.
Regards,
Vikas Kumar
0 -
If there is a such command, altair has already bring it to GUI
I know there is a way, but it may not be same as hyperview
My ideal is invoke a second hypermesh, show only its graphic window, and embed it in to a frame beside 1st hm graphic area. As they are different process, you cannot use model browser or panels of the 1st to manipulate the 2nd, that is not same as hyperview
But if you just need to see 2 viewports, eg to make report, it is fine
0 -
Altair Forum User said:0
-
Hello all,
@Vikas Kumar , I have got the same query as your, But i have to get some more info shown in the figure below. This information is required in capturing an animation (by area). @tinh you have already provided valuable information above but i cannot understand the procedure. There are keywords like .mainFrame, .center., etc. that i cant find in hyperview documentation. Maybe you can share me the link.<?xml version="1.0" encoding="UTF-8"?>
Looking forward for solution /emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' /> , Thanks all in advance
0 -
Altair Forum User said:
Hello all,
@Vikas Kumar , I have got the same query as your, But i have to get some more info shown in the figure below. This information is required in capturing an animation (by area). @tinh you have already provided valuable information above but i cannot understand the procedure. There are keywords like .mainFrame, .center., etc. that i cant find in hyperview documentation. Maybe you can share me the link.<?xml version="1.0" encoding="UTF-8"?>
Looking forward for solution /emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' /> , Thanks all in advance
Hi Zeta,
Give me some time i will provide you same info.
Regards
Vikas
0 -
hi @Vikas Kumar , did you get any information regarding my query. Looking forward for your inputs.
Have a nice Monday
Thanks and Regards
0