How to transform a selected entity

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Anderson
Posts: 13
Joined: 04 Dec 2008, 12:55

How to transform a selected entity

Post by Anderson » 18 Dec 2008, 12:03

Dear Sergey,

I use CADImage.AddScaledDXF to transform my dxf file. But when I save it, I cann't open the
saved DXF file. I don't know why ?
Could you show me some sample code to transform the selected entity ? (such as scale, rotate )

Thanks!

Anderson

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

Re: How to transform a selected entity

Post by support » 22 Dec 2008, 10:28

Dear Anderson,
I use CADImage.AddScaledDXF to transform my dxf file. But when I save it, I cann't open the
saved DXF file. I don't know why ?
As we previously said (post http://www.cadsofttools.com/forum/viewt ... =15&t=1413 on 09 Dec 2008) we caught this problem. We will inform you when it is solved.
Could you show me some sample code to transform the selected entity ? (such as scale, rotate )
Please try the following code:

Code: Select all

private void ChgInsScaleRotation_Click(object sender, System.EventArgs e)
{
	if(this.cadImage == null) return;
	this.cadImage.UseDoubleBuffering = false;
	for (int i = 0;i < this.cadImage.Converter.GetCounts(CADImport.FaceModule.ConvSection.Entities); i++)
	{
		CADEntity entEntity = (CADEntity)this.cadImage.Converter.GetSection(CADImport.FaceModule.ConvSection.Entities).Entities[i];

		if (entEntity.EntType == CADImport.EntityType.Insert)
		{					
			CADInsert entIns = entEntity as CADInsert;
			entIns.Scale = new DPoint(1.5, 0.5,1);
			entIns.Angle = 45;
			this.cadImage.Converter.Loads(entIns);
			this.cadPictBox.Invalidate();
		}
	}
}
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

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

Re: How to transform a selected entity

Post by support » 22 Dec 2008, 13:05

Dear Anderson,
I use CADImage.AddScaledDXF to transform my dxf file. But when I save it, I cann't open the
saved DXF file. I don't know why ?
As we previously said (post http://www.cadsofttools.com/forum/viewt ... =15&t=1413 on 09 Dec 2008) we caught this problem. We will inform you when it is solved.
What is the version of Visual Studio that you use?

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

Anderson
Posts: 13
Joined: 04 Dec 2008, 12:55

Re: How to transform a selected entity

Post by Anderson » 22 Dec 2008, 17:59

Dear Sergey,

My version of Visual Studio is VS.net 2005

Anderson.

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

Re: How to transform a selected entity

Post by support » 24 Dec 2008, 16:20

Hello!

The problem has been solved.
Please contact us via e-mail to support@cadsofttools.com accordingly the question of getting updated beta version of the library.

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

Post Reply