To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 4537
4536  |  4538
Subject: 
Re: Help for povray needed!
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 19 Apr 2000 19:53:33 GMT
Highlighted: 
(details)
Viewed: 
2393 times
  
In lugnet.cad.dev, Michael Lachmann wrote:

> In lugnet.cad.dev, Chuck Sommerville writes:
> > 
> > You probably want something like :
> > povengine /RENDER <filename> /NR /EXIT
> 
> <SNIP>
> 
> Thanks, this helps a lot, but now there is one problem left:
> 
> MLCad first creates the dat file to be converted, than calls L3P to convert it
> into pov and than it executes pov-ray with the above statement.
> If you do that for multiple steps, you either get multiple instances of pov-ray
> running at the same time, which might overload several computers, or if you
> just enable one instance, you get an error saying that the renderer is already
> running ....

There are a couple of ways around this.  One is to write all the POV-Ray
commands to a .BAT file, using the START command with its /WAIT option.  After
compiling all the needed files, run the .BAT file.

Another way is to launch POV-Ray, then put MLCad to sleep until POV-Ray
finishes.

In LDAO, I use the following routine to launch a process and wait for it to
finish:

Public Sub ShellAndWait(ByVal CmdLine As String)
' CmdLine holds the commandline for a program to be launched.
   Dim proc As PROCESS_INFORMATION
   Dim start As STARTUPINFO
   Dim ret As Long

' Initialize the STARTUPINFO structure:
   start.cb = Len(start)

' Start the shelled application:
   ret = CreateProcessA(0&, CmdLine, 0&, 0&, 1&, _
            NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)

' Wait for the shelled application to finish:
   ret = WaitForSingleObject(proc.hProcess, INFINITE)
   ret = CloseHandle(proc.hProcess)
End Sub



Message has 1 Reply:
  Re: Help for povray needed!
 
In lugnet.cad.dev, Steve Bliss writes: <SNIP> Thank you steve! Over the week-end I had more time, and found exactly the same way, just in C++. But (how should it be different) there is another problem ... This works fine for pov-ray, with L3P this (...) (26 years ago, 23-Apr-00, to lugnet.cad.dev)

Message is in Reply To:
  Re: Help for povray needed!
 
(...) <SNIP> Thanks, this helps a lot, but now there is one problem left: MLCad first creates the dat file to be converted, than calls L3P to convert it into pov and than it executes pov-ray with the above statement. If you do that for multiple (...) (26 years ago, 19-Apr-00, to lugnet.cad.dev)

7 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR