crop dwg file

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
parsa.vali
Posts: 5
Joined: 08 Nov 2010, 20:17

crop dwg file

Post by parsa.vali » 08 Nov 2010, 20:27

hi im doing a project and it should have these features that im going to tell u:
user can enter two x,y numbers.
the application should crop the dwg file with the exact scale that i want and that point should be at the center of the image and at last the image should save with the JPG or other graphical formats.i want to use a dll in visual studio to write this application with C#.NET can u help me which dll should i use?and can u help me how i can perform these features with that dll?

parsa.vali
Posts: 5
Joined: 08 Nov 2010, 20:17

help me

Post by parsa.vali » 09 Nov 2010, 10:33

its really necessary for me plz give me some solution.

parsa.vali
Posts: 5
Joined: 08 Nov 2010, 20:17

help me

Post by parsa.vali » 09 Nov 2010, 10:36

in ABviewer i saw my solution.you can draw a rectangle and save it with its background to your hard disk.its similar to crop that i want.
but i want a dll that i can write C# codes to do that.plz help me.

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

Re: crop dwg file

Post by support » 09 Nov 2010, 18:32

Hello.
CAD Import .NET library provides such functionality. However please note, this software require developer license. Please fill and send us the following form for CAD Import .NET compilable package receiving: http://www.cadsofttools.com/download/RL ... tended.zip
Please let us know if you need end-user licensing instead.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

parsa.vali
Posts: 5
Joined: 08 Nov 2010, 20:17

answer

Post by parsa.vali » 09 Nov 2010, 21:26

hi
thank u very much to your attention sir.
we should do these features with your trial dll after we finding out its possible to do this project with your dll we try to purchase your license dll.but before that we should realize that whether its possible or not.
so i want to ask from you if its possible to give me a trial version of cadimport.net DLL?we want to investigate your DLL.we are really serious to buy your product.
i forewarded this message to your mail address(info@cadsofttools.com) before.plz answere my question to my email address thank you very much sir.
parsa.vali@gmail.com

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

Re: crop dwg file

Post by support » 10 Nov 2010, 12:14

Hello.
We have sent you the compilable software package. Thank you for your request.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

parsa.vali
Posts: 5
Joined: 08 Nov 2010, 20:17

Re: crop dwg file

Post by parsa.vali » 11 Nov 2010, 20:20

hi sir
im so sry because of my questions.
the most important problem that i faced is drawing a rectangle with the universal X,Y cordinates that user giving us as double variables.f.example i want to draw a rectangle with these X,Y cordinates(2547610.22554742 , 584329.206228227) and after that crop this rectangle and save it as a graphical formats.
forexample these cordinates(28565120, 15773195) are for this area in the world:"3100 Steeles Avenue East, Markham, ON L3R 8T3, Canada" (you can search it on google map)
if you open a dwg file in viewer demo example when u move your mouse possition you can see the X,Y cordinates of that possition at status bar at the bottom of the example.
i worked on that package you sent for me(to my email).
with this code you can draw a rectangle in which area you want but it gets int parameters:"Rectangle rec=new Rectangle(int x,int y,int width,int height)"
and with savetofile() method you can save it as a image or other formats but my problem is drawing this rectangle with that cordinates that i told u.
can u help me?its the most problem and last problem i have.

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

Re: crop dwg file

Post by support » 12 Nov 2010, 18:21

Hello.
You can draw a rectangle with CAD coordinates using the following code:

Code: Select all

		if (this.cadImage == null)
		{
			this.cadImage = new CADImage();
			this.cadImage.InitialNewImage();
		}
		this.cadImage.UseDoubleBuffering = false;

		CADLWPolyLine Poly = new CADLWPolyLine();
		Poly.Closed = true;
		Poly.Color = Color.Azure;            

		CADVertex Vert = new CADVertex();
		Vert.Point = new DPoint(0, 0, 0);
		Poly.AddEntity(Vert);
                        
		Vert = new CADVertex();
		Vert.Point = new DPoint(100.35, 0, 0);
		Poly.AddEntity(Vert);

		Vert = new CADVertex();
		Vert.Point = new DPoint(100.35, 100.35, 0);
		Poly.AddEntity(Vert);

		Vert = new CADVertex();
		Vert.Point = new DPoint(0, 100.35, 0);
		Poly.AddEntity(Vert);

		Poly.Loaded(this.cadImage.Converter);
		this.cadImage.Converter.OnCreate(Poly);
		this.cadImage.CurrentLayout.AddEntity(Poly);

		this.cadPictBox.Invalidate();
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply