CADImport.NET

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
JormaS
Posts: 5
Joined: 03 May 2007, 18:15
Location: Italy

CADImport.NET

Post by JormaS » 03 May 2007, 18:15

Hi to all,
I'm developing a database application, written in C#, that need to display a preview of indexed DWG files on a fileserver or directly loaded from a stream read from binary SQL server's fields. I've downloaded CADImport.NET from your site and... wow! it's really a great component.

Now i've this two question:
1. If we buy licenses necessary for our development team can I deploy the CADImport.DLL (using the installer of our application release) to our end-users without royalties?
2. I need to load the DWG file and then pass it to a different picture box located on a form. I've tried this:
2.1 Placed picture box on a form.
2.2 Assigned, in the code, the picture box to the CADControlModule.CADPictureBox property.
2.3 Used CADControlModule.DrawCADImage(CADPictureBox.CreateGraphics()).
When I load the DWG file it appears in the picture box but immediatly after it disappears. I think that I'm doing something wrong...

Can you help me?
Thanks in adavance for your support and excuse me for my poor english. Thanks again for this component!!

Jorma Sturari
Milano, Italy

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

Post by support » 07 May 2007, 10:29

Dear Jorma Sturari,

<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">1. If we buy licenses necessary for our development team can I deploy the CADImport.DLL (using the installer of our application release) to our end-users without royalties?<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Please write us on info@cadsofttools.com to get a full information on this question.
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">2. I need to load the DWG file and then pass it to a different picture box located on a form. I've tried this:
2.1 Placed picture box on a form.
2.2 Assigned, in the code, the picture box to the CADControlModule.CADPictureBox property.
2.3 Used CADControlModule.DrawCADImage(CADPictureBox.CreateGraphics()).
When I load the DWG file it appears in the picture box but immediatly after it disappears. I think that I'm doing something wrong...<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
It is necessary to use method CADImage.Draw. Here goes an example based on Viewer demo:
<ul><li>Add to the project new form called <b>TestForm</b>.</li>
<li>Hang the following code on <b>Paint</b> event:

Code: Select all

<font color="blue">private void</font id="blue"> TestForm_Paint(<font color="blue">object</font id="blue"> sender, System.Windows.Forms.PaintEventArgs e)
{
	<font color="blue">if</font id="blue">(CADImportForm.MainForm.actForm.FCADImage == <font color="blue">null</font id="blue">) <font color="blue">return</font id="blue">;
	CADImportForm.MainForm.actForm.FCADImage.Draw(e.Graphics, <font color="blue">new</font id="blue"> RectangleF(0, 0, 100, 100));
}
</li>
<li>Add new button on the <b>ViewerMainForm</b> and the following code:

Code: Select all

<font color="blue">private void</font id="blue"> btnViewForm_Click(<font color="blue">object</font id="blue"> sender, System.EventArgs e)
{
	TestForm t1 = <font color="blue">new</font id="blue"> TestForm();
	t1.ShowDialog();
}
</li></ul>
Sergey.




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

Post Reply