Hi, I have two formal modules, let's say A and B. In module A I have objects with BMP pictures in their Object Text attributes (only one BMP per object). Objects in module B have out-links to objects in module A. When I create a DXL Layout column using the traditional Analysis --> Wizard tool, I select Object Identifier and Object Text attributes, but I don't get the pictures, only the texts. I have tried making my own DXL script, but so far I had no success. Here goes some additional information: Doors release: 9.3.0.7 DXL Attempts: - I've tried using the 'bitmap' perm and I could get the picture in the column, but I couldn't get a good cursor position to draw the bitmap. Even if I could, this wouldn't be good to be used for an export (for instance, to Word), since canvas would be null. Does anyone have a clue to solve this? It seems so simple that I want to display exactly what is in the source object, but I simply couldn't get it through... Many thanks. Wagner wschalch - Wed Aug 03 12:32:07 EDT 2016 |
Re: Display picture in DXL Layout (Analysis -> Wizard) Just to be clear are you talking DOORS Picture or DOORS OLE that you want. If it is DOORS ole -- change function probeRichAttr_ last value from false to true If it is a DOORS Picture you have to get doors name for the picture then manipulate with dxl functions. |
Re: Display picture in DXL Layout (Analysis -> Wizard) DOORSHAM - Wed Aug 03 14:16:39 EDT 2016 Just to be clear are you talking DOORS Picture or DOORS OLE that you want. If it is DOORS ole -- change function probeRichAttr_ last value from false to true If it is a DOORS Picture you have to get doors name for the picture then manipulate with dxl functions. Hi, Thanks for the reply. It is a DOORS Picture. However, I couldn't find the good DXL functions to manipulate them. What I did: 1) I used 'getPictName' function with the object pointed by the current object. 2) I tried to use the 'bitmap' function to draw the picture on the canvas. With this solution, I had a problem because I don't know the coordinates to use. If I put (0,0), the picture gets over the texts already there in the Object Text. I couldn't find a way to get the current cursor position... This could help. Anyway, if I use this kind of solution (i.e. using the canvas), I won't be able to export the view to a Word file, since when exporting the canvas is null, so it wouldn't be possible to draw the picture. Any other idea? Thanks again. Wagner |
Re: Display picture in DXL Layout (Analysis -> Wizard) wschalch - Wed Aug 03 14:57:11 EDT 2016 Hi, Thanks for the reply. It is a DOORS Picture. However, I couldn't find the good DXL functions to manipulate them. What I did: 1) I used 'getPictName' function with the object pointed by the current object. 2) I tried to use the 'bitmap' function to draw the picture on the canvas. With this solution, I had a problem because I don't know the coordinates to use. If I put (0,0), the picture gets over the texts already there in the Object Text. I couldn't find a way to get the current cursor position... This could help. Anyway, if I use this kind of solution (i.e. using the canvas), I won't be able to export the view to a Word file, since when exporting the canvas is null, so it wouldn't be possible to draw the picture. Any other idea? Thanks again. Wagner It is my personal preference to not use doors pictures, since the vendor provides limited support and pictures are a general pain in the britches. I suggest replace picture with ole object where possible. |
Re: Display picture in DXL Layout (Analysis -> Wizard) DOORSHAM - Wed Aug 03 15:34:07 EDT 2016 It is my personal preference to not use doors pictures, since the vendor provides limited support and pictures are a general pain in the britches. I suggest replace picture with ole object where possible. Yes, I'm getting to the same conclusion. I'll try to do that, but maybe I won't be able to change pictures to OLE objects. Thanks Wagner |
Re: Display picture in DXL Layout (Analysis -> Wizard) wschalch - Wed Aug 03 16:27:49 EDT 2016 Yes, I'm getting to the same conclusion. I'll try to do that, but maybe I won't be able to change pictures to OLE objects. Thanks Wagner There is a way using the clipboard functions of DOORS. I think you can do "pictureCopy" and afterwards get the richtext from the clipboard (richClip). Then you can display with displayRich. Clipboard operations are always flaky. If you want more stability use exportPicture. Regards, Mathias |
Re: Display picture in DXL Layout (Analysis -> Wizard) Mathias Mamsch - Thu Aug 04 03:54:37 EDT 2016 There is a way using the clipboard functions of DOORS. I think you can do "pictureCopy" and afterwards get the richtext from the clipboard (richClip). Then you can display with displayRich. Clipboard operations are always flaky. If you want more stability use exportPicture. Regards, Mathias Thanks Mathias. I also read someting about problems using the clipboard with Layout DXL. I'll give it a try. I couldn't understand your suggestion to use 'exportPicture'. This function will save a file with the picture, but then how do I put the picture in the Layout DXL? Thanks again Wagner |
Re: Display picture in DXL Layout (Analysis -> Wizard) wschalch - Thu Aug 04 09:27:12 EDT 2016 Thanks Mathias. I also read someting about problems using the clipboard with Layout DXL. I'll give it a try. I couldn't understand your suggestion to use 'exportPicture'. This function will save a file with the picture, but then how do I put the picture in the Layout DXL? Thanks again Wagner Hmm good question :-) I did not think this through to the end, but there should be a way to put a picture inside a layout DXL. Regards, Mathias |
Re: Display picture in DXL Layout (Analysis -> Wizard) Mathias Mamsch - Thu Aug 04 13:02:41 EDT 2016 Hmm good question :-) I did not think this through to the end, but there should be a way to put a picture inside a layout DXL. Regards, Mathias Hi,
Is there a better way of showing DOORS picture within a DXL Layout column, without using the clipboard?
pragma runLim, 0
#include <C:\DXL\includes\stringFunctions.inc>
#include <C:\DXL\includes\userDefined.inc>
#include <C:\DXL\includes\oleObjects.inc>
void displayRich(Buffer b) {
displayRich (("{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}}{\\*\\generator Msftedit 5.41.21.2510;}\\viewkind4\\uc1\\pard\\f0\\fs20" (stringOf(b)) "\\par}"))
}
string xColorTable = "{\\colortbl ;"
xColorTable = xColorTable "\\red255\\green0\\blue0;" // red \cf1 \highlight1
xColorTable = xColorTable "\\red0\\green255\\blue0;" // green \cf2 \highlight2
xColorTable = xColorTable "\\red0\\green0\\blue255;" // blue \cf3 \highlight3
xColorTable = xColorTable "\\red255\\green255\\blue0;" // yellow \cf4 \highlight4
xColorTable = xColorTable "\\red255\\green0\\blue255;" // purple \cf5 \highlight5
xColorTable = xColorTable "\\red0\\green255\\blue255;" // light blue \cf6 \highlight6
xColorTable = xColorTable "\\red255\\green255\\blue255;" // white \cf7 \highlight7
xColorTable = xColorTable "\\red0\\green0\\blue0;" // black \cf8 \highlight8
xColorTable = xColorTable "}"
Module m = current
Baseline b = baseline(1, 8, "") // get selected Baseline.
Module mb = load(m, b, false) // open module.
if (null(mb)){
displayRich("{\\b Module[Null]}")
} else {
// look up the object in the skip, fetch the text and display it
int nr = obj."Absolute Number"
Object o = byAbsNo(nr, mb, false)
if (!null(o)) {
if (isDeleted(o)) {
displayRichWithColor(toString("\\pard " + xColorTable + "{\\cf1 {\\b Undeleted Object}}"))
} else {
// Picture comparision
bool bIsPicture = o."Picture"
bool cIsPicture = obj."Picture"
if (cIsPicture || bIsPicture) {
if (cIsPicture && bIsPicture) {
Buffer b = readPictureData o
Buffer c = readPictureData obj
if (null(b) || null(c) || b != c) {
displayRich("{\\b Picture Changed}")
pictureCopy(o)
displayRich(stringOf(richClip))
}
delete b
delete c
} else {
displayRich("{\\b Mismatch on Picture count!}")
}
}
// Text comparision
Buffer b = create (); b = o."Object Text"
Buffer c = create (); c = obj."Object Text"
if (b != c) {
displayRich("{\\b Text Changed}")
} else {
b = richTextNoOle o."Object Text"
c = richTextNoOle obj."Object Text"
if (b != c) {
displayRich("{\\b richText Changed}")
}
}
delete b
delete c
// OLE comparision
OleObjects ol1 = createOleObjects(o."Object Text")
OleObjects ol2 = createOleObjects(obj."Object Text")
if (count ol1 > 0 && count ol1 == count ol2) {
// If this happens its bad: Then our regular expression in OleObjects.inc is wrong.
if (null ol1 || null ol2) {
displayRich("{\\b Cannot parse OLE Object}")
} else {
for i in 0:(count ol1) - 1 do {
// get the picture data of the first OLE object
Buffer pdi1 = picturedata ol1[i]
Buffer pdi2 = picturedata ol2[i]
if (pdi1 != pdi2) {
displayRich(toString("{\\b OLE[" + i + "] Not Equal!}"))
displayRich(picture ol1[i])
//break
}
}
}
} else if (count ol1 > 0 || count ol2 > 0) {
displayRich("{\\b Mismatch on OLE count!}")
}
deleteOleObjects ol1
deleteOleObjects ol2
}
} else {
displayRichWithColor(toString("\\pard " + xColorTable + "{\\cf3 {\\b New Object}}"))
}
}
|
Re: Display picture in DXL Layout (Analysis -> Wizard) I noticed in your first message regarding this problem that you say, "I select Object Identifier and Object Text attributes, but I don't get the pictures, only the texts". If you're using the Analysis Wizard to follow those links, are you also checking the checkbox for "Include OLE Objects"? |