.NET

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

Solutions to Insert Barcode in DWG using C#

659 Views, 10 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 11 (559 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: 390
Registered: ‎04-30-2009
Message 3 of 11 (542 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,691
Registered: ‎10-12-2006
Message 4 of 11 (536 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 11 (496 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 11 (371 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 11 (279 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,691
Registered: ‎10-12-2006
Message 8 of 11 (256 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.


New Member
mindylynn0
Posts: 2
Registered: ‎09-21-2014
Message 9 of 11 (102 Views)

Re: Solutions to Insert Barcode in DWG using C#

09-27-2014 08:01 PM in reply to: cindy313

As i know, barcode font can be used for barcode application, also available for QR Code barcode image. But 2d QR Code is a more complex barcode symbology among all common barcodes.

New Member
andyadams
Posts: 1
Registered: ‎09-29-2014
Message 10 of 11 (75 Views)

Re: Solutions to Insert Barcode in DWG using C#

09-29-2014 11:35 PM in reply to: masewee

Hi,you said you have experience of creating barcode in C# ASP.NET and you used that third party control. However,i don't want to pay for that software,do you have some better ideal of creating barcode in C# ASP.NET???:cathappy:

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.