get_iframe#

Item.get_iframe(width=0, height=0)#

Get the iframe object corresponding to the item.

Parameters:
widthint, optional

Width of the iframe object. The default is min(Item width * 1,1, 1000). For example, if the item width is 0, the default is 1000.

heightint, optional

Height of the iframe object. The default is min(Item height, fixed height), where the fixed height is 800 for an item scene and 400 otherwise.

Returns:
iframe

iframe object corresponding to the item. If no iframe can be generated, None is returned.

Examples

import ansys.dynamicreporting.core as adr
adr_service = adr.Service(ansys_installation = r'C:\Program Files\ANSYS Inc\v232')
ret = adr_service.connect(url='http://localhost:8010')
my_txt = adr_service.create_item()
my_txt.item_text = '<h1>The test</h1>This is a text item'
item_iframe = my_txt.get_iframe()