Author |
Topic  |
|
hajo_old
Germany
141 Posts |
Posted - 03/19/2004 : 10:58:51 AM
|
Hello, All
I wanted to create a dialog for exporting graphs to MS Powerpoint.
Therefore I've created a frame within the dialog for use as a preview of the graphicpage to export.
The problem now is, that I can create the preview page and view a new created graphpage by calling GraphControl::Create (only axes + labels as starting point), but I'm not able (I don't know how) to fill the preview with an existing graphpage I created during my analysis before.
Can anybody help me? Thanks Hajo
p.s. There really is a great lack of documentation at that point!!
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
|
hajo_old
Germany
141 Posts |
Posted - 03/23/2004 : 11:33:59 AM
|
Hello, all
Seems nobody has an idea about that issue ...
Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/23/2004 : 3:06:46 PM
|
Hello, Scott
thanks for your answer!! I found the definition of the code you pointed out in the headers
quote: GraphPage gp("Graph2"); m_gpControl2.AttachPage(gp);
but I tried with a Page object - and failed ...
Page gp("Graph2"); m_gpControl2.AttachPage(gp);
As I'm sitting at my home pc (after work ...) I'm going to try your suggestion using a GraphPage instead tomorrow at work!
I'll give you feedback!!
Thanks Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/24/2004 : 06:10:35 AM
|
Hello, Scott
I tried out your hint. The page was successfully attached, but the graph isn't updated and no Curve is on the layer!
This is the code I used: Control control1 = this->GetItem( IDC_GRAPH_PREVIEW ); HWND hWnd1 = control1.GetSafeHwnd(); m_PreviewGraph.CreateControl( hWnd1 ); m_PreviewGraph.Create(); GraphPage& gp = m_PreviewGraph.GetPage(); GraphLayer gl = gp.Layers(); // Get active layer GraphPage pg("GraphG"); m_PreviewGraph.AttachPage(pg);
Clicking twice on the Layer-Button (Layer_1) brings up the Plot dialog (as usual). There I can verify the successfull attachment of the new GraphPage. But the Plot Details dialog launched by double clicking the graphics area only shows one empty layer with no Curves attached - So no update is done at that place - or do I have to do that on my own? - If so, how?
Thanks Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/24/2004 : 06:14:44 AM
|
try removing the line
m_PreviewGraph.Create();
as it will create a new graph. When you need to attach a graph, no need to create a new one.
CP
|
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/24/2004 : 06:30:32 AM
|
Hello, CP
that rocks !!
Thanks Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/24/2004 : 10:49:25 AM
|
Hello, All
The last tip was grate, but now I run into some other problems.
My GraphPages are structured in several folders of my project.
I'm going through the Project.GraphPages collection and try to fill my preview GraphControl with the Pages I read out of the collection.
The Page seems only to be visible, if the project folder, containing the Page to preview is the active folder.
Is that a bug or feature??
Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/24/2004 : 11:00:47 AM
|
Bug! internally code decided not visible, something not connected correctly to tell internal code that graph window present in GraphControl. Looks like SR3 or Origin8, trackered as 6164.
CP
|
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/24/2004 : 11:32:28 AM
|
Hello, CP
Hmmmmm! Would need that earier ...
An other problem .... May I send you my whole dialog I've created (source & dll) as I'm producing somewhere a memory hole I can't get rid off ... after closing the dialog ...
Maybe there's a problem with vsFlexLM od DialogBuilder.
Thanks so far Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
Laurie
USA
404 Posts |
Posted - 03/24/2004 : 12:13:27 PM
|
Hi Hajo,
Yes, please ftp a zip file of your code. Upload the file to ftp://ftp.originlab.com/incoming.
Let us know when the file is there. Someone will then look at your code and give advice on how to fix any memory leaks.
Thank you, Laurie
OriginLab Technical Support |
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/24/2004 : 2:12:18 PM
|
Hello, Laurie
you should have received the files just at the moment.
So far Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/24/2004 : 8:54:51 PM
|
Hi Hajo,
I have looked at your code briefly. It seems that there is some problem with folders,
Folder fld = Project.GetFolderWithPage(strGrpPage); fld.Activate();
I assume that you were doing this because of bug 6164. Separately, we can look into Project.GetFolderWithPage and see if we need to fix that area, but 6164 has been fixed so I suggest you wait for SR3.
CP
|
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/25/2004 : 04:32:01 AM
|
Hello, CP
Thanks for feedback.
quote: It seems that there is some problem with folders,
Folder fld = Project.GetFolderWithPage(strGrpPage); fld.Activate();
What kind of problem do I have here? - Yes it's true, I try that workarround because of the tracked bug.
Is that the reason for the strage behaviour after closing the dialogue also (failure of GraphPages selection in Project View)?
Thanks Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 is now hajo  |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/25/2004 : 2:43:59 PM
|
The function,
Project.GetFolderWithPage(str)
is activating the found folder and reactivate the original active, which lead to the strange behaviour you saw. This ( Tracker 6168 ) bug is now fixed and your code works fine now in the inhouse SR3 build that we have, with or without the
Folder fld = Project.GetFolderWithPage(strGrpPage);
codes.
CP
|
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/26/2004 : 03:03:08 AM
|
Hello, CP
Thanks for feedback ....
Are the code changes somewhere in *.c/*.h files distributed in the OriginC or system folder? - May it be possible to make the fix available to me more earier than SR3?
Thanks a lot Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch SiemensVDO Automotive Regensburg
|
 |
|
cpyang
USA
1406 Posts |
Posted - 03/26/2004 : 12:02:09 PM
|
sorry, these bugs are internal, but maybe we can make beta of SR3 for you.
CP
|
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/27/2004 : 10:58:11 AM
|
Hello, CP
Thanks for your info ... Beta would be great ...
When is the SR3 scheduled?
Thanks Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch SiemensVDO Automotive Regensburg
|
 |
|
hajo_old
Germany
141 Posts |
Posted - 04/01/2004 : 3:15:47 PM
|
Hello, All
Thanks for your assistance. All is working fine now!!
An other "problem" found the way to light now ...
If I change the line in the flexLM and select an other GraphPage to be shown in the preview the whole Origin menus are flickering (I guess as the GraphContol handles the displayed GrapPage like any "normal" GraphPage shown as Origin window and so triggers the display of the menus related to be shown by making a GrapPage active)
Can I disable that event so the flickering is prevented?
Thanks Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch SiemensVDO Automotive Regensburg
|
 |
|
cpyang
USA
1406 Posts |
Posted - 04/02/2004 : 09:19:18 AM
|
quote: whole Origin menus are flickering
Hi Hajo,
We were not able to see this problem. We use your dialog to flip through various different 3D/2D plots and layout and saw no flickering. Layout dose have problem, which we will look into.
When you switch to show a graph in a dialog, the original graph will be hidden and when you switch to another graph again, the hidden graph will be shown again, so maybe that was what you were seeing?
CP
|
 |
|
hajo_old
Germany
141 Posts |
Posted - 04/02/2004 : 10:00:05 AM
|
Hello, CP
quote: When you switch to show a graph in a dialog, the original graph will be hidden and when you switch to another graph again, the hidden graph will be shown again, so maybe that was what you were seeing?
This is one thing I'm seeing - would it make sense to have an option in in the GraphControl to ONLY preview a bitmap of the selected GraphPage to avoid that issue? (I think of a memberFunction like GraphControl::AttachAsPicture() ) I would only need that, as I don't want to do any editing - just having a last controlling look at the graph before plotting or exporting it!
The other thing really influences the display of the menus - maybe you'll try to put the GraphPages into some folders - the notification event as by switching from Worksheet to GraphPage or NotesWindow will be thrown (as far as I can see that).
Or it may make sense to create a new class GraphPicture / LayoutPicture, only for handling that preview similar stuff when no complete GraphControl object with all it's features is needed!!
quote: Folder fld = Project.GetFolderWithPage(strGrpPage); fld.Activate();
I just remembered my workarround ..... Maybe you could try that too, as I'm at home and at the weekend in the moment and the next few days ... Maybe that's the reason for the flickering ....
Thanks and a nice weekend
Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch SiemensVDO Automotive Regensburg
Edited by - hajo on 04/02/2004 10:03:47 AM |
 |
|
hajo_old
Germany
141 Posts |
Posted - 04/05/2004 : 05:34:41 AM
|
Hello, all
the flickering of the menu seems to be caused by the "workaround" I used in order to activate the folder, the GraphPage is contained in. By commenting out the activating coden the flickering disappears!
What about the "Picture"-stuff ...
Thanks so far Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch SiemensVDO Automotive Regensburg
|
 |
|
cpyang
USA
1406 Posts |
Posted - 04/05/2004 : 2:09:51 PM
|
More discussion on beta forum...
CP
|
 |
|
|
Topic  |
|