| Author |
Message |
Guest
|
Posted:
Wed Dec 15, 2004 11:21 pm Post subject:
Oracle Programming so a Drawing will Open using the Solidwor |
|
|
Okay geniuses, we are trying to program through Oracle a way to open a
drawing using the Solidworks Viewer.
We are able to fire off the Solidworks Viewer but the drawing does not
open up. What is note worthy, is that the journal file generated is
not <swxJRNL.swj>, instead it is WINNTswxJRNL.BAK.
This journal file tells the tale that the SWViewer did start and that
is all (ie. no open command was issued).
Here is the Oracle code so far. This is for users that do not have the
Solidworks application on thier desktop, but do have the Viewer. This
code works fine for opening drawings that are DWG format with a
VoloViewer.
This first procedure checks if the viewer is open. If not, it then
opens it...
PROCEDURE chk_solidworks IS
convid PLS_INTEGER;
appid PLS_INTEGER;
BEGIN
convid := DDE.Initiate('SWViewer', 'system');
DDE.Terminate(convid);
EXCEPTION
when others then
appid := DDE.App_Begin('c:\program
files\solidworksviewer\swviewer.exe',DDE.APP_MODE_MAXIMIZED);
END;
This second procedure opens the drawing...
Declare
convid PLS_INTEGER;
path Varchar2(150);
Begin
path := :dm_profile.doc_path;
convid := DDE.Initiate('SWViewer', 'system');
DDE.Execute(convid,'[open("'||path||'")]',10000);
DDE.Terminate(convid);
End;
|
|
| Back to top |
|
 |
CS
Guest
|
Posted:
Thu Dec 16, 2004 12:06 am Post subject:
Re: Oracle Programming so a Drawing will Open using the Soli |
|
|
I can't help you with Oracle but you could create a batch and run that
if you put something similar to this in a batch it will open a file using
swviewer you may have to check for the installation directory on the machine
though
D:
cd Program Files\SOLIDWORKSVIEWER
SWVIEWER.exe "c:\410001.SLDDRW"
pause
Corey
<waligora@afc-holcroft.com> wrote in message
news:1103134899.499340.154250@c13g2000cwb.googlegroups.com...
| Quote: | Okay geniuses, we are trying to program through Oracle a way to open a
drawing using the Solidworks Viewer.
We are able to fire off the Solidworks Viewer but the drawing does not
open up. What is note worthy, is that the journal file generated is
not <swxJRNL.swj>, instead it is WINNTswxJRNL.BAK.
This journal file tells the tale that the SWViewer did start and that
is all (ie. no open command was issued).
Here is the Oracle code so far. This is for users that do not have the
Solidworks application on thier desktop, but do have the Viewer. This
code works fine for opening drawings that are DWG format with a
VoloViewer.
This first procedure checks if the viewer is open. If not, it then
opens it...
PROCEDURE chk_solidworks IS
convid PLS_INTEGER;
appid PLS_INTEGER;
BEGIN
convid := DDE.Initiate('SWViewer', 'system');
DDE.Terminate(convid);
EXCEPTION
when others then
appid := DDE.App_Begin('c:\program
files\solidworksviewer\swviewer.exe',DDE.APP_MODE_MAXIMIZED);
END;
This second procedure opens the drawing...
Declare
convid PLS_INTEGER;
path Varchar2(150);
Begin
path := :dm_profile.doc_path;
convid := DDE.Initiate('SWViewer', 'system');
DDE.Execute(convid,'[open("'||path||'")]',10000);
DDE.Terminate(convid);
End;
|
|
|
| Back to top |
|
 |
Guest
|
Posted:
Thu Dec 16, 2004 1:33 am Post subject:
Re: Oracle Programming so a Drawing will Open using the Soli |
|
|
Thanks,
We just became successful.
seems we had to place the path right into the command string that fired
off the application.
Ron
|
|
| Back to top |
|
 |
|
|
|
|