D
D
dotrem2014-08-18 07:39:37
GIS
dotrem, 2014-08-18 07:39:37

How to clone a shape in Ingeo print layout?

The print layout has an IInPictureGridFigure. I want to programmatically create another grid with the same style as the one already in the layout. Ideally, of course, I would generally clone the existing one, but so far I have not found such an opportunity. So far I'm doing this:
Code:

var newTableFigure = MyLayoutWindow.Figures.Add(TInPictureFigureType.inftMap) as IInPictureGridFigure;
                newTableFigure .Bottom = existTable.Bottom;
                newTableFigure .Width = existTable.Bottom;
                newTableFigure .GridFormat = existTable.GridFormat;
                newTableFigure .ColFormat = existTable.ColFormat;
                 newTableFigure .RowFormat = existTable.RowFormat;

But unfortunately RowFormat/ColFormat/GridFormat are not set this way.
I tried creating like this:
orgTableFigure.GetFormat(j, -1).Size[TInGridFormatKind.ingfFont] = organizationTable.GetFormat(-1, 0).Size[TInGridFormatKind.ingfColWidth];

But unfortunately Ingeo crashes with an error:

Destructive by itself (Exception from HRESULT: 0x8000FFFF (E_UNEZPECTED))

How can the problem be solved?
This is how the error does not appear:
newTableFigure .GetFormat(j, -1).Size[TInGridFormatKind.ingfColWidth] = 250; //existFigure .GetFormat(j, -1).Size[TInGridFormatKind.ingfColWidth];
                                newTableFigure .GetFormat(j, -1).Update();

But unfortunately the column width size is not set.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question