Hexagon Geospatial
MENU

Support GeoMedia

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 53
Registered: ‎05-30-2016

How to change Layout Window SmartFrame2d size programmatically

Know how to create a new SmartFrame2d, but can't seem to find the trick to resizing one programmatically. Seems like it would be obvious, but can't find the method.

 

I thought maybe the Range method but that simply returns the range, doesn't set it.

 

Any tips?

Regular Contributor
Posts: 162
Registered: ‎05-25-2016

Re: How to change Layout Window SmartFrame2d size programmatically

Did you try ChangeCrop method of SmartFrame2d object?

Contributor
Posts: 43
Registered: ‎11-10-2015

Re: How to change Layout Window SmartFrame2d size programmatically

Hi hesrah

 

I have the same question. By the past, a document named 'Development using GM engine' contained some examples of SmartFrames2D in a layout sheet. I can not find it today.

 

Are the different options in SmartFrames2D documented somewhere?

 

Regards,

Regular Contributor
Posts: 162
Registered: ‎05-25-2016

Re: How to change Layout Window SmartFrame2d size programmatically

Contributor
Posts: 53
Registered: ‎05-30-2016

Re: How to change Layout Window SmartFrame2d size programmatically

Here's what I did. 

 

frame.SetKeyPoint(2, xPosition, yPosition, 0);

 

where frame is the SmartFrame2d,

2 is the 2nd key point,

xPosition is the x position on the sheet in meters,

yPosition is the y position on the sheet in meters,

0 is the z position

 

A key point, is one of the square handles around the frame, when it is selected, that you can grab with the mouse.

 

There are 8 key points, from 0-7.

0 is lower left, and is also the origin point.

1 is lower right

2 is upper right

3 is upper left

4 is lower mid point

5 is right mid point

6 is upper mid point

7 is left mid point

 

Another approach is to simply scale the object using:

 

frame.ScaleObject(1.5)

 

where 1.5, or whatever, is the scale factor.

 

Let me know if you need help getting the SmartFrame2d object.

 

Contributor
Posts: 43
Registered: ‎11-10-2015

Re: How to change Layout Window SmartFrame2d size programmatically

Thanks hesrah

 

Here are the informations I remember

 

Thanks

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.