.NET

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

Solutions to Insert Barcode in DWG using C#

465 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
Posts: 1
Registered: ‎06-19-2013
Message 2 of 8 (365 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
Posts: 288
Registered: ‎04-30-2009
Message 3 of 8 (348 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: 4,710
Registered: ‎10-12-2006
Message 4 of 8 (342 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
Posts: 1
Registered: ‎07-03-2013
Message 5 of 8 (302 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
Posts: 1
Registered: ‎12-06-2013
Message 6 of 8 (177 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
Posts: 13
Registered: ‎10-29-2013
Message 7 of 8 (85 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: 4,710
Registered: ‎10-12-2006
Message 8 of 8 (62 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.


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community