.NET

Reply
Member
bibeputt
Posts: 4
Registered: ‎01-07-2009
Message 1 of 8 (546 Views)

Solutions to Insert Barcode in DWG using C#

546 Views, 7 Replies
01-21-2009 04:01 AM
Hello Everybody

Just looking out some options to insert Barcode / Barcode Image inside .dwg file using c#.

Please share your experience if anybody has ever worked on that.

Thanks
Ashish...
New Member
masewee
Posts: 1
Registered: ‎06-19-2013
Message 2 of 8 (446 Views)

Re: Solutions to Insert Barcode in DWG using C#

06-19-2013 09:27 PM in reply to: bibeputt

No one replied? Ok. I happen to read this post which is the topic I am interested in. I have experience of creating barcode in C# ASP.NET. At that time, I used that third party control. Nowadays, I think the easily way to create barcode is to use a third party control. You just need to install that tool into your program and then follow the guides of barcode creation, like this barcode data encoding guide in C#. So barcode creation becomes very easy.

ADN Support Specialist
augusto.goncalves
Posts: 358
Registered: ‎04-30-2009
Message 3 of 8 (429 Views)

Re: Solutions to Insert Barcode in DWG using C#

06-20-2013 07:31 AM in reply to: bibeputt

Some time ago I did a implementation with Hatch and QR Code, you can get the source code at http://labs.autodesk.com/utilities/qrcodes/

 

One additional point, not implemented on the sample above, was to insert the Hatch as a Block, so the user cannot modify it by accident.

 

Regards,



Augusto Goncalves
Autodesk Developer Network
*Expert Elite*
dgorsman
Posts: 5,359
Registered: ‎10-12-2006
Message 4 of 8 (423 Views)

Re: Solutions to Insert Barcode in DWG using C#

06-20-2013 08:52 AM in reply to: augusto.goncalves

Barcodes can be as simple as using a font.  QR codes are significantly more complex.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


New Member
jakcswe
Posts: 1
Registered: ‎07-03-2013
Message 5 of 8 (383 Views)

Re: Solutions to Insert Barcode in DWG using C#

07-03-2013 12:54 AM in reply to: dgorsman

Yes, creating barcode in C# is quite easy with a barcode font. But I think QR Code is not that complex. QR Code is the most commonly used type of barcode.

New Member
makaveiljojo
Posts: 1
Registered: ‎12-06-2013
Message 6 of 8 (258 Views)

Re: Solutions to Insert Barcode in DWG using C#

12-06-2013 12:11 AM in reply to: bibeputt

Check the sample code of how to generate barcode with C# and insert into document:

C# Sample code

     using KeepAutomation.Barcode.Bean;
BarCode barcode = new BarCode();
barcode.Symbology = KeepAutomation.Barcode.Symbology.Code39;
barcode.CodeToEncode = "111222333";
barcode.ChecksumEnabled = true;
barcode.X = 1;
barcode.Y = 50;
barcode.BarCodeWidth = 100;
barcode.BarCodeHeight = 70;
barcode.Orientation = KeepAutomation.Barcode.Orientation.Degree90;
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel;
barcode.DPI = 72;
barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif;
barcode.generateBarcodeToImageFile("C://barcode-code39-csharp.gif");

/* Output barcode images to different objects
barcode.generateBarcodeToStream("Stream Object");
barcode.generateBarcodeToGraphics("Graphics Object");
barcode.generateBarcodeToGraphics("HttpResponse Object");
*/
Contributor
cindy313
Posts: 17
Registered: ‎10-29-2013
Message 7 of 8 (166 Views)

Re: Solutions to Insert Barcode in DWG using C#

03-11-2014 07:23 PM in reply to: dgorsman

dgorsman wrote:

Barcodes can be as simple as using a font.  QR codes are significantly more complex.


why so ?

*Expert Elite*
dgorsman
Posts: 5,359
Registered: ‎10-12-2006
Message 8 of 8 (143 Views)

Re: Solutions to Insert Barcode in DWG using C#

03-12-2014 09:28 AM in reply to: cindy313

http://en.wikipedia.org/wiki/QR_code

 

Now, try building one.  Don't forget the mask.  :smileyhappy:

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.