CS_DXF and CS_DWG from PHP

Discuss and ask questions about CAD plugins for 3rd party software: IrfanView, XnView, Total Commander, Konvertor FM.

Moderators: SDS, support, admin

Post Reply
asd12
Posts: 3
Joined: 20 Aug 2005, 17:33
Location: Germany

CS_DXF and CS_DWG from PHP

Post by asd12 » 20 Aug 2005, 17:42

Hello,

i registered to cs_dxf and cs_dwg and want to use them from my PHP-application.
I use nConvert (from XnView) to convert CAD-files.

If i execute nconvert from the windows commandline it works. But if i execute it from PHP with the same command the output-image has the evaluation-text included!
I tryed different methods from php to execute it but nothing worked.

Any Ideas?

Thanks and greetings

Andy Dorner

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 22 Aug 2005, 19:25

Hi,

Could you please explain how do you use Nconvert (as separately as in your program) and to what format do you convert dwg/dxf file.

Sergey.

please post questions to the forum or write to support@cadsofttools.com

asd12
Posts: 3
Joined: 20 Aug 2005, 17:33
Location: Germany

Post by asd12 » 22 Aug 2005, 20:24

Hi Sergey,

Yes, sure!

From windows command-line i type:

E:\CAD>nconvert -out bmp -o test.bmp eec001-e-6-a.dwg

and i get the bmp <b>in black/white</b> without the evaluation-text.
(output-format jpeg is somehow not possible)

in PHP:

<?php

$cmd = "nConvert -out bmp -o 'c:/tmp2C7.bmp' 'c:/eec001-e-6-a.dwg'";
// i tryed these functions:
#passthru($cmd, $res);
#exec($cmd, $res);
system($cmd, $res);
// and popen($cmd, 'r');...
?>
i also tryed it with the full path to nConvert at the command.


here the result <b>is colored </b>and with the text 'CS_DWG.DLL - Evaluation version Purchase CS_DWG.DLL on cadsofttools.com'

The same with DXF-Files...

In my XnView-Directory (C:\Software\XnView\PlugIns) are the files CS_DWG.dll and CS_DXF.dll

hope its not an lower-/uppercase-Problem ;-)

I only want to convert dwg or dxf-files.

Do i need for PHP the CADImage.dll?? Or does it need an special environment? How does it work? Perhaps it has no right to access the registry from php??

Andy

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 23 Aug 2005, 13:17

Hi Andy,

We've tried to convert dwg, dxf, hpgl files from command line in different modes (colored/black-white, registered/unregistered, with CADImage.DLL or CS_DWG.DLL/CS_DXF.DLL/CS_HPGL.DLL). Every time the result was as expected in dependence of predefined parameters.

Then we tried to repeat this actions through the php and failed. It seems so that php prohibits access to registry and the conversion occures by default options.

The search in internet on this topic gave no results.

Sergey.

please post questions to the forum or write to support@cadsofttools.com

asd12
Posts: 3
Joined: 20 Aug 2005, 17:33
Location: Germany

Post by asd12 » 23 Aug 2005, 13:44

Hi Sergey,

thanks a lot for your testings!

Is it possible to put the license in a textfile instead of the registry?

Andy

Evgeny
Posts: 115
Joined: 16 Mar 2004, 11:04
Location: Russia

Post by Evgeny » 24 Aug 2005, 11:33

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by asd12</i>
<br />Hi Sergey,

thanks a lot for your testings!

Is it possible to put the license in a textfile instead of the registry?

Andy
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Hi Andy,
php uses user INTERNET_GUEST while license info is written under HKEY_CURRENT_USER in Windows registry.
If you need to use the plugin via Internet or Intranet you need a special Server license.
Can you describe for which purposes you need to make conversion using php? You can write to info@cadsofttools.com
Thank you.
Kind regards,
Evgeny

Post Reply