Need an advice for a solution (in .NET)

This forum is for general questions, comments and discussions on the CADSoftTools products.

Moderators: support, SDS, admin

Post Reply
Vyro
Posts: 1
Joined: 14 Jun 2006, 11:35

Need an advice for a solution (in .NET)

Post by Vyro » 14 Jun 2006, 11:43

Hi,

I'm a developer in VB.Net, but I'm very new in the CAD world, so sorry for any stupid question.

I've a little problem. I need to manage some DWG files. I've some dwg files stored in a filesystem and sometimes I need to open it and show on it a label in a x,y position.

I've said show, because I don't want to write any kind of data (a label in this case) on my original DWG, or if I need to write on it, I want to write in a new DWG. Sometimes I need to save in a BMP/GIF or JPEG format or any kind of image formats file.

Any product selled on this site can help me ?

Sorry for my english.

Any example was appreciate [:p]

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

Post by support » 14 Jun 2006, 18:31

Hello,

We would like you to pay attention on the following products:
<ul><li>CADImport.NET: http://www.cadsofttools.com/download/ca ... i>CADViewX component: http://www.cadsofttools.com/download/ca ... p</li></ul>

The following examples must help you.
<b>CADImport.NET</b> (demo Viewer in the \cadimportnet\cadimportnet_site\sources\Viewer\.. folder):
We use cadPictBox_Paint method for drawing images on onPaint event:
<ul><li>open file by <b>DrawCADImage(e.Graphics);</b> method</li><li>draw necessary labels, note etc:</li></ul>

Code: Select all

<b>Private Sub</b> cadPictBox_Paint(<b>ByVal</b> sender <b>As</b> System.Object, <b>ByVal</b> e <b>As</b> System.Windows.Forms.PaintEventArgs) <b>Handles</b> cadPictBox.Paint
        <b>Me</b>.DrawCADImage(e.Graphics)
        e.Graphics.DrawLine(Pens.Black, 0, 0 , 100, 100)
<b>End Sub</b>
<b>CADViewX</b> (Demo VB.NET in the ..\CADViewX\Demos\VB.NET\.. folder after installing):

Code: Select all

<b>Private Sub</b> CADViewX1_OnMouseMove(<b>ByVal</b> sender <b>As</b> System.Object, <b>ByVal</b> e <b>As</b> AxCADViewLib.ICADViewXEvents_OnMouseMoveEvent) <b>Handles</b> CADViewX1.OnMouseMove
        <b>Dim</b> P <b>As</b> CADViewLib.tagFPoint
        <b>If Not</b> CADViewX1.Empty() <b>Then</b>
            ...
            <b>If</b> fmScaledPicForm.Visible() <b>Then</b>
                fmScaledPicForm.pbScaledPicture.Image() = CADViewX1.ScaledRectPicture(e.x, e.y, 4.0, fmScaledPicForm.Width, fmScaledPicForm.Height)
            <b>End If
        End If
    End Sub</b>
Please explain us more in detail what tasks exactly you have if this answer does not stisfy you.
Sergey.

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

Post Reply