Using the wizard to create traceability columns works fine when you want to display attributes and OLEs - but Pictures?
if (getPictName (obj) != "") then {
//display "Picture"
int h = 0, w = 0
getPictWidthHeight(obj,w,h)
DBE cnv = getCanvas
setHeight(h)
setWidth(w)
string sFileName = getPictName(obj)
bitmap(cnv, sFileName,0, 0)
} else {
display ""
}
SystemAdmin - Wed Nov 10 07:45:07 EST 2010 |
Re: How to use layout DXL to display Pictures If this were me, I'd try to get the Picture format and have special code for the ones that don't work; using this perm and these constants: int getPictFormat(Object) int formatBMZ int formatWMZ int formatEMF int formatEMZ int formatRLE int formatTIF int formatTIFF int formatGIF int formatJPE int formatJFIF int formatJPG int formatJPEG int formatUNKNOWN int formatEPSF int formatWMF int formatDIB int formatBMP int formatPNG_ int formatPNG If you cannot play around and make it work, at least you could isolate the formats that don't display, and display "XYZ Format picture un-displayed". And if I were to play around with it, I'd then go to my Windows File Types from Windows Explorer and make sure those format types are associated with some program like Paintbrush. And if I really wanted to solve it, I'd say something else pretty silly because I know it would encourage other folks who may know to chime in and correct me. Lets hope that happens here.... lol Well actually, if it was me I'd cut the picture, use MS-Word and create a Word object, paste the picture, then copy the word object and paste it back into the Module as an OLE. Get rid of all the Pictures, they byte.
|
Re: How to use layout DXL to display Pictures
Here is my code for rendering a picture in a canvas as well as moving it for scrolling.
// Renders and positions a OLE object in the canvas.
void DoDraw_CB ( DBE DBEElement )
{
Bitmap b ;
Object oleObject ;
// If an objects in the list was selected or an OLE is already displayed.
int listIndex = get ( OleList ) ;
if ( ( listIndex >= 0 ) ||
( OleObject != null ) )
{
// Clear the background and get the object with the OLE.
background ( OleCanvas , colorWhite ) ;
if ( listIndex >= 0 )
{
oleObject = get ( OLEObjects , listIndex , 0 ) ;
}
else
{
oleObject = OleObject ;
}
// Turn the OLE into a bitmap and draw it on the screen, positioned for scrolling.
// Positioning is inverse of scrolling as to move the view right, the image has to move left.
b = oleLoadBitmap ( OleCanvas , oleObject , false , ImageX , ImageY ) ;
drawBitmap(OleCanvas,b,-ScrollX,-ScrollY) ;
// Select the object the OLE came from.
current = requirementModule ;
current = oleObject ;
int objectNum = oleObject."Absolute Number" ;
gotoObject ( objectNum , requirementModule ) ;
}
}
|
Re: How to use layout DXL to display Pictures Did you find a way to include a picture in a layout DXL? Looking to do something similar. |
Re: How to use layout DXL to display Pictures KatherineWilson - Thu Aug 07 17:22:02 EDT 2014 Did you find a way to include a picture in a layout DXL? Looking to do something similar. Don't know. But I'm confident that since Layout DXL refreshes maybe 10 times a second, response time will be terrible. Use an Attr-DXL and display it. |
Re: How to use layout DXL to display Pictures llandale - Fri Aug 08 13:08:11 EDT 2014 Don't know. But I'm confident that since Layout DXL refreshes maybe 10 times a second, response time will be terrible. Use an Attr-DXL and display it. Thanks for the suggestion! I'll give it a try. Do you happen to know of any examples of Attr-DXLs being used to display a picture? |