Results 1 to 8 of 8

Thread: insert barcode to drawing

  1. #1
    Member
    Join Date
    2009-05
    Posts
    3
    Login to Give a bone
    0

    Talking insert barcode to drawing

    I was wonder there is anyway we could insert tif file(barcode)?
    our company drawing has barcode attach to dwg file, right now i manually insert(raster image refernce) "barcode" which is same as file name on m_space and making veiwport for that. but it is so many steps to do it. anyone have idea guide me please, by the way I'm not american so you notice. thanks.

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,603
    Login to Give a bone
    0

    Default Re: insert barcode to drawing

    If you are just trying to automate the insertion of an image, it probably would not be too much trouble.

    You could also create a typical viewport for your "barcode" in your template file.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    Login to Give a bone
    0

    Default Re: insert barcode to drawing

    Hi,

    I have the same problem with yeun. But according to your talk, I still have no clear idea about this.

  4. #4
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: insert barcode to drawing

    Simple way: Look at what the command-line options of the -ATTACH command. Next you get the current DWG's path and filename from the DwgPrefix and DwgName system variables (use getvar for these). Then you need to alter the extension to obtain the TIF/PNG/etc. file's path (either use the vl-filename-* functions or extract part of the DWG filename through substr & strlen). Next make a lisp defun which uses these things and then send them to the attach command - if you prefix this defun's name with c: it becomes a new command you can use in the DWG.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  5. #5
    Login to Give a bone
    0

    Default Re: insert barcode to drawing

    If you wanna draw barcode and generate barcode image, some free barcode generator online can be found, just search in "free barcode generator sodftware".

  6. #6
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: insert barcode to drawing

    You mean e.g. this one: http://sourceforge.net/projects/zint/

    Nice - allows for many different types of coding and saves to PNG/EPS/SVG, but i don't think it solves the OP's (both yeun & Martin) problem. The OP's already got the TIF image file which is to be placed in the drawing. What he's after is a way to insert that more automaGically than ImageAttach --> Browse to File --> Select --> OK --> Click Left-Bottom point --> Click Top-Right point ... for each drawing.

    Basically something like this:
    Code:
    (defun c:InsertImage  (/ filename found)
      (setq filename
             (strcat (getvar 'DwgPrefix)
                     (substr (setq filename (getvar 'DwgName)) 1 (- (strlen filename) 3))))
      (if (vl-some '(lambda (ext) (setq found (findfile (strcat filename ext))))
                   '("JPG" "GIF" "PNG" "TIF" "BMP"))
        (command "_.ATTACH" found "_Non" '(0. 0. 0.) "" ""))
      (princ))
    Last edited by RenderMan; 2012-12-06 at 02:35 PM. Reason: automaGically
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  7. #7
    Login to Give a bone
    0

    Default Re: insert barcode to drawing

    problem is solved, thanks anyway~

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,603
    Login to Give a bone
    0

    Default Re: insert barcode to drawing

    Quote Originally Posted by Martin_Brook_1989342426 View Post
    problem is solved, thanks anyway~
    Would you mind letting us know how it was solved?
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. 2013: Get revision & drawing Number from Drawing insert into word or excel
    By stcy_hennig in forum AutoCAD LT - General
    Replies: 2
    Last Post: 2013-11-26, 01:35 PM
  2. insert "barcode" to drawing
    By yeun in forum Facilities Management In Practice
    Replies: 5
    Last Post: 2012-11-20, 04:38 AM
  3. Replies: 2
    Last Post: 2007-05-17, 10:50 PM
  4. Insert block definition from one drawing into current drawing
    By ktisdale.118609 in forum VBA/COM Interop
    Replies: 2
    Last Post: 2006-08-08, 10:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •