Oracle Programming so a Drawing will Open using the Solidwor
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Oracle Programming so a Drawing will Open using the Solidwor

 
Post new topic   Reply to topic    CADForums.net Forum Index -> SolidWorks
Author Message
Guest






Posted: Wed Dec 15, 2004 11:21 pm    Post subject: Oracle Programming so a Drawing will Open using the Solidwor Reply with 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
CS
Guest





Posted: Thu Dec 16, 2004 12:06 am    Post subject: Re: Oracle Programming so a Drawing will Open using the Soli Reply with quote

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 Reply with quote

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
 
Post new topic   Reply to topic    CADForums.net Forum Index -> SolidWorks All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB