how can i change block type to FREngine.BlockTypeEnum.BT_Text

e.i if i have a table block i want to change it during runtime to a text block.

thanks

asked 24 Jan '14, 13:43

vbknight's gravatar image

vbknight
3115

edited 24 Jan '14, 15:46

SDK_support's gravatar image

SDK_support ♦♦
2763


Please use IBlock::Type property for this. For more information see Help → API Reference → Layout-Related Objects → Block. Please note that this property is a read-only, for information about how to work with such properties, please see Help → Guided Tour → Advanced Techniques → Working with Properties.

link

answered 24 Jan '14, 15:49

SDK_support's gravatar image

SDK_support ♦♦
2763

block type is defined at the creation and cannot be changed. You can only change it by deleting the block and replacing it with the correct type.

link

answered 07 Mar '14, 08:37

vbknight's gravatar image

vbknight
3115

Yes, just copy the region of the block you need to replace to another Region object with the help of the IRegion::CopyFrom method, then delete the old block from the layout by calling the ILayoutBlocks::DeleteAt method and finally create a new block of the desired type and add it into the desired layout by calling the AddNew method of the Layout object.

link

answered 07 Mar '14, 13:42

SDK_support's gravatar image

SDK_support ♦♦
2763

Sorry ... but If I create a new button in the Toolbar: - I can insert ourselves the code to invoke the Command that turns a block of type picture of a block of type text; - Make a loop on all the blocks in the document and save the file in a text contained in the blocks through education GetAsTextBlock.

I think it is the principle on which is based the previous comment!

link
This answer is marked "community wiki".

answered 06 Jun '14, 18:13

Antonio's gravatar image

Antonio
111

edited 06 Jun '14, 18:13

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×43
×35
×15

Asked: 24 Jan '14, 13:43

Seen: 1,363 times

Last updated: 06 Jun '14, 18:13

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal