Search found 22 matches
- 22 Jan 2020, 10:24
- Forum: CAD .NET
- Topic: Move to CADEntity
- Replies: 5
- Views: 14990
Re: Move to CADEntity
I still can't find out how to do it...
I would like move rectangle to center and fit the one to window in one.
Can you help me, please
Vladimir
I would like move rectangle to center and fit the one to window in one.
Can you help me, please
Vladimir
- 17 Dec 2019, 20:04
- Forum: CAD .NET
- Topic: Move to CADEntity
- Replies: 5
- Views: 14990
Re: Move to CADEntity
Maybe I have an old version, but ImageRectangleF property cannot be set because is read only, but I can set Position instead in Viewer Demo. How recalculate the current scale to fit rectangle to CadPictureBox ? Public Sub GotoRectangle(ByVal viewrect As DRect) Dim rect As Rectangle = Me.cadPictBox.C...
- 17 Dec 2019, 17:30
- Forum: CAD .NET
- Topic: Crop Image to Printable Area
- Replies: 9
- Views: 9448
Re: Crop Image to Printable Area
Hello Mikhail,
thank you for your exhaustive answers to my exhausting questions
Vladimir
thank you for your exhaustive answers to my exhausting questions
Vladimir
- 13 Dec 2019, 09:23
- Forum: CAD .NET
- Topic: Relative coordinates conversion
- Replies: 4
- Views: 5677
Re: Relative coordinates conversion
Hello Mikhail,
thank you for the explanation.
So there is no information about the parent of individual entity ?
Vladimir
thank you for the explanation.
So there is no information about the parent of individual entity ?
Vladimir
- 11 Dec 2019, 11:11
- Forum: CAD .NET
- Topic: Relative coordinates conversion
- Replies: 4
- Views: 5677
Relative coordinates conversion
Hi all, I search for Line and Text entities, recursive for Blocks, MText (Line inside Block, Text inside MText). When I add this entity (may be children or not) to own collection, how can I get information about Parent of entity (Block,MText) and recognize if entity was placed in root of tree or is ...
- 10 Dec 2019, 21:49
- Forum: CAD .NET
- Topic: Crop Image to Printable Area
- Replies: 9
- Views: 9448
Re: Crop Image to Printable Area
Hi, I read an old post where was mentioned that *.ctb files are not supported. We have licensed CAD:NET version 10.1 , this version also does not allow this ? Can be obtained product updates ? I found CADImage.Converter.Layers collection and set LineWeight to required value by layer name. It looks n...
- 10 Dec 2019, 21:07
- Forum: CAD .NET
- Topic: Printer , PrintDocument, HardMarginsX and HardMarginsY
- Replies: 7
- Views: 10624
Re: Printer , PrintDocument, HardMarginsX and HardMarginsY
Hello Mikhail, Graphics must also be moved when print to the printer : private void printDocument_BeginPrint(object sender, PrintEventArgs e) { printAction = e.PrintAction; printDocument.OriginAtMargins = false; } private void printDocument_PrintPage(object sender, PrintPageEventArgs e) { Graphics g...
- 10 Dec 2019, 15:15
- Forum: CAD .NET
- Topic: Crop Image to Printable Area
- Replies: 9
- Views: 9448
Re: Crop Image to Printable Area
Hello Mikhail, I think that styles for text and lines are missing, all entities have color and thickness defined by layer, but layer has set thickness to default therefore everything is very thin and hardly visible. Is possible create layer editable copy with settings for printing ? Respective set t...
- 10 Dec 2019, 09:30
- Forum: CAD .NET
- Topic: Crop Image to Printable Area
- Replies: 9
- Views: 9448
Re: Crop Image to Printable Area
Code I have used to copy entities onto a new layout : Dim lay As CADLayout = New CADLayout With src_img .Converter.AddLayout(lay) Dim cec As CADEntityCollection = .MultipleSelectExt(src_rect, False, False) For Each ett As CADEntity In cec lay.AddEntity(ett) Next .IsWithoutMargins = True .BorderType ...
- 09 Dec 2019, 20:39
- Forum: CAD .NET
- Topic: Printer , PrintDocument, HardMarginsX and HardMarginsY
- Replies: 7
- Views: 10624
Re: Printer , PrintDocument, HardMarginsX and HardMarginsY
Hello,
It looks similar I tryied, but without Rectangle.Truncate.
I test it tomorrow, thanks again
Vladimir
It looks similar I tryied, but without Rectangle.Truncate.
I test it tomorrow, thanks again
Vladimir
- 09 Dec 2019, 20:28
- Forum: CAD .NET
- Topic: Crop Image to Printable Area
- Replies: 9
- Views: 9448
Re: Crop Image to Printable Area
Hello Mikhail, Is it necessary to draw to a bitmap first and then draw bitmap using DrawImage? Inspired by another forum post I copied entities inside rectangle to new layout and then when PrintPage event raised I draw image : cadImg.DrawMode = CADDrawMode.Black cadImg.Draw(e.Graphics, rectangle) Th...
- 09 Dec 2019, 19:12
- Forum: CAD .NET
- Topic: Printer , PrintDocument, HardMarginsX and HardMarginsY
- Replies: 7
- Views: 10624
Re: Printer , PrintDocument, HardMarginsX and HardMarginsY
Hello Mikhail, thanks for your answer. I tried to print to printable area by converting drawing units to hundredths of inch (1/100"), right and bottom edges of the image were still invisible, then I set the graphic units to pixels, get printable area in pixels using code below, draw edges using grap...
- 04 Dec 2019, 14:29
- Forum: CAD .NET
- Topic: Crop Image to Printable Area
- Replies: 9
- Views: 9448
Crop Image to Printable Area
How to print a selection defined by a rectangle (DRect) to a full paper size page without adjusting to the printable area but crop (cut out) print margins of the image ? I copied selected entities inside rectangle to new layout, got pure extents of image, now I want to print this selection using Pri...
- 02 Dec 2019, 20:27
- Forum: CAD .NET
- Topic: Printer , PrintDocument, HardMarginsX and HardMarginsY
- Replies: 7
- Views: 10624
Printer , PrintDocument, HardMarginsX and HardMarginsY
Greetings to all, I want to print to the maximum possible area, allowing the hard edges of the printer. I want to determine the minimum margins (left, right, top and bottom) when printing horizontally. I use PrintDocument and calculate in PrintPage event, OriginAtMargins is set to False, Landscape =...
- 10 Jan 2017, 10:48
- Forum: CAD .NET
- Topic: DWG Version
- Replies: 2
- Views: 18241
Re: DWG Version
You can get AC#### code directly from dwg file by reading first six bytes : Function GetDwgVersion(ByVal sFileName As String) As String Dim strVersion As String = "" Using reader As New System.IO.BinaryReader(File.Open(sFileName, FileMode.Open, FileAccess.Read)) Dim bt() As Byte = reader.ReadBytes(6...