Author Topic: DWG version  (Read 4354 times)

0 Members and 1 Guest are viewing this topic.

David Bethel

  • Swamp Rat
  • Posts: 656
Re: DWG version
« Reply #15 on: August 25, 2013, 10:52:34 AM »
Some of my friends would say  'yous guys'      :evil:
R12 Dos - A2K

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: DWG version
« Reply #16 on: August 25, 2013, 01:51:02 PM »
This will give you the Cad Engine & Version of the open drawing, (system the current user is running).
...
To get the correct BricsCAD version you should use the _VERNUM variable:
Code - Auto/Visual Lisp: [Select]
  1. (getvar '_vernum) ; => "13.2.10 (UNICODE)"

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: DWG version
« Reply #17 on: August 25, 2013, 09:07:47 PM »
@ MP
it wasn't my intention to disregard the swamp in any way.... !!!
In my last 2 questions on the swamp, LM replied immediately with a link to his site, so when I said to look on his site first, was like a joke/compliment

Sorry I failed to read it that way and for the ensuing tangent, oh well.

I completely agree with you MP -

I knew you would and why I had no reservation posting my comment.

Firstly, given the tremendous length of time that AutoLISP has been around (~ 27 years) it is almost guaranteed that every task or programming puzzle has already been solved by someone else - it would be very rare to write something entirely original in AutoLISP.

Somewhat agree, though I'm not suggesting for a minute existing solutions shouldn't be challenged, refined, or completely rewritten. The body of knowledge should always be growing, evolving, improving -- not static.

... the community will only continue to benefit from information & knowledge that is shared.

<ding> <ding>

You <Lee> yourself post lots of original thinking AutoLISP routines.

Fully agree. New thinking should be encouraged, fostered, shared -- that's what the swamp is about.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1454
  • Marco
Re: DWG version
« Reply #18 on: August 26, 2013, 08:21:17 AM »
...and the program (Autocad, Bricscad,....) in which the dwg was last saved? ...
Code: [Select]
; 26/08/2013 - Marc'Antonio Alessi, Italy
; Not fully tested: nil if not Autodesk Dwg
(defun ALE_DwgAutodeskP (DwgFil / FilPnt RlnStr)
  (cond
    ( (null
        (and
          (setq DwgFil (findfile DwgFil))
          (setq FilPnt (open DwgFil "r"))
        )
      )
    )
    ( (wcmatch (strcase DwgFil t) "*`.dwg")
      (setq RlnStr (read-line FilPnt))
    )
  )
  (if (= 'file (type FilPnt))
    (progn
      (close FilPnt)
      (member 8 (vl-string->list RlnStr))
    )
    (quit)
  )
)