Author Topic: 20.0  (Read 8348 times)

0 Members and 2 Guests are viewing this topic.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: 20.0
« Reply #15 on: April 04, 2014, 07:40:56 AM »
but I do not really like, is there anyone who has something more concise?
You could consolidate the BC stuff into something like this (similar principle than you're doing for the AC stuff:
Code - Auto/Visual Lisp: [Select]
  1. (strcat "DOSLIB"
  2.         (cdr (cond ((assoc (atof AcaVer) '((17.2 . "11") (18.0 . "12") (18.1 . "13") (19.0 . "14")))) ("")))
  3.         (cond ((eq "x86" PrcArc) "")
  4.               ("x64"))
  5.         ".BRX")
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Keith Brown

  • Swamp Rat
  • Posts: 601
Re: 20.0
« Reply #16 on: April 04, 2014, 08:57:53 AM »
Didnt they change the number to 20 because Autocad 2015 is not binary compatible with previous versions?  The number always gets changed when that happens.  Also, i do have to recompile some of my .net code as it causes errors when loaded into 2015.  I believe this is due to the fact that the MDIActiveDocument needs to be checked for null before using.  Changing the startup variable to 0 appeared to temporarily fix the issue.
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1454
  • Marco
Re: 20.0
« Reply #17 on: April 04, 2014, 09:09:04 AM »
but I do not really like, is there anyone who has something more concise?
You could consolidate the BC stuff into something like this (similar principle than you're doing for the AC stuff:
Code - Auto/Visual Lisp: [Select]
  1. (strcat "DOSLIB"
  2.         (cdr (cond ((assoc (atof AcaVer) '((17.2 . "11") (18.0 . "12") (18.1 . "13") (19.0 . "14")))) ("")))
  3.         (cond ((eq "x86" PrcArc) "")
  4.               ("x64"))
  5.         ".BRX")
Thanks Irne, this is a pretty good solution, maybe with _vernum is more simple.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1454
  • Marco
Re: 20.0
« Reply #18 on: April 04, 2014, 09:11:17 AM »
For BricsCAD using _VERNUM is easier:
Code: [Select]
(getvar '_vernum) ; => "14.2.09 (UNICODE)"
Do you have a list of values for Bricscad like this:
Code: [Select]
AutoCAD version                        Value returned by _VERNUM
-------------------------------------------------------------------------------------------------------------------
AutoCAD 2000 (shipping)                    T.0.98 / T.1.07
AutoCAD 2000 (+ Service Pack 1)                T.1.08
AutoCAD 2000 (+ Service Pack 2)                T.1.09
AutoCAD 2000i (shipping)                U.0.90
AutoCAD 2000i (+ Service Pack 1)            U.1.20
AutoCAD 2000i (+ Service Pack 2)            U.1.81
AutoCAD 2002 (shipping)                    K.0.30
AutoCAD 2002 (+ Service Pack 1)                K.0.44
AutoCAD 2004 (shipping)                    V.0.86
AutoCAD 2004 (+ Service Pack 1a)            V.1.22
AutoCAD 2005 (shipping)                    N.0.63
AutoCAD 2005 (+ Service Pack 1)                N.0.84
AutoCAD 2006 (shipping)                    Z.54.10
AutoCAD 2006 (+ Service Pack 1)                Z.77.0
AutoCAD 2007 (shipping)                    A.54.0
AutoCAD 2007 (+ Service Pack 1)                A.116.0
AutoCAD 2008 (shipping)                    B.51.0 (UNICODE)
AutoCAD 2008 (+ Service Pack 1)                B.219.0 (UNICODE)
AutoCAD 2009 (shipping)                    C.56.0 (UNICODE)
AutoCAD 2009 (+ Service Pack 1)                C.111.0 (UNICODE)
AutoCAD 2009 (+ Service Pack 1 (subscription))        C.112.0 (UNICODE)
AutoCAD 2009 (+ Service Pack 2)                C.608.0 (UNICODE)
AutoCAD 2009 (+ Service Pack 3)                C.711.0 (UNICODE)
AutoCAD 2010 (shipping)                    D.55.0 (UNICODE)
AutoCAD 2010 (+ Service Pack 1)                D.215.0 (UNICODE)
AutoCAD 2011 (shipping)                    E.49.0 (UNICODE)
AutoCAD 2011 (+ Update 1.1) Update 1 was replaced.    E.115.0.0 (UNICODE)
AutoCAD 2011 (+ Update 2)                 E.209.0.0 (UNICODE)
AutoCAD 2012 (shipping)                    F.51.0.0 (UNICODE)
AutoCAD 2012 (+ Service Pack 1)             F.107.0.0 (UNICODE)
AutoCAD 2012 (+ Service Pack 2)             F.205.0.0 (UNICODE)
AutoCAD 2013                         G.55.0.0 (UNICODE)
AutoCAD 2013 (+ Service Pack 1)             G.112.0.0 (UNICODE)
AutoCAD 2013 (+ Service Pack 1.1)             G.114.0.0 (UNICODE)
AutoCAD 2014 inglese                    I.18.0.0 (UNICODE)

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: 20.0
« Reply #19 on: April 04, 2014, 09:20:44 AM »
Didnt they change the number to 20 because Autocad 2015 is not binary compatible with previous versions?
Exactly as I thought too.
Another where this version numbering would help though is when loading a specific ARX. E.g. loading the correct OpenDCL.ARX. And I think that is why Adesk did this - to make it simpler to figure which ARX to load.
It's just that previously the number change implied other changes as well. Not just the ARX stuff. This time round (officially) only the ARX is affected.

Though you seem to have found a DotNet issue which proves there's something already wrong: I was hinting that such unexpected stuff could easily happen if anything was referring to the integer portion of the version number.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: 20.0
« Reply #20 on: April 04, 2014, 09:22:27 AM »
Thanks Irne, this is a pretty good solution, maybe with _vernum is more simple.
You're very welcome. Unfortunately I don't have BC here with me - perhaps I could try later at home. Though there I've got BC only in Linux, so it might be some other stuff to look for (not to mention the vlax stuff won't work).
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1454
  • Marco
Re: 20.0
« Reply #21 on: April 04, 2014, 09:52:14 AM »
You're very welcome. Unfortunately I don't have BC here with me - perhaps I could try later at home. Though there I've got BC only in Linux, so it might be some other stuff to look for (not to mention the vlax stuff won't work).
Irne, maybe this is a good solution (I do not like to change the name of Doslib files as I've seen around)
; DOSLIB - BitFlg = 0 > unload + BitFlg = 1 > load + BitFlg = 2 > load first time
Code: [Select]
(defun ALE_Doslib (BitFlg / ArxNam PrcArc Is_64b)
  (cond
    ( (= 1 BitFlg) (or DOS_COPY (command "DosLib")) )
    ( (setq    ; restituisce "AMD64" anche su processore Intel e "x86" su 32 Bit
        PrcArc (getenv "PROCESSOR_ARCHITECTURE")
        Is_64b (if (and (< 1 (strlen PrcArc)) (eq "64" (substr PrcArc (1- (strlen PrcArc))))) "x64" "")
        ArxNam (if (= (substr (getvar "acadver") 6) "Bricscad")  ;#BCFlg
                 (strcat "DOSLIB" (itoa (atoi (getvar "_VERNUM"))) Is_64b ".BRX")
                 (strcat "DOSLIB" (itoa (atoi (getvar "ACADVER"))) Is_64b ".ARX")
               )
      )
      (if DOS_COPY
        (and (= 0 BitFlg) (arxunload ArxNam nil))
        (if (= 2 BitFlg)
          (if (findfile ArxNam)
            (arxload ArxNam nil)
;_i__       (prompt "\nDOSLIB non trovato. Controlla le cartelle di installazione. ")
;|e|;       (prompt "\nDOSLIB not found. Verify your Asso Tools folders. ")
          )
        )
      )
    )
  )
)

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: 20.0
« Reply #22 on: April 04, 2014, 10:17:53 AM »
Do you have a list of values for Bricscad like this:
Code: [Select]
AutoCAD version                        Value returned by _VERNUM
-------------------------------------------------------------------------------------------------------------------
AutoCAD 2000 (shipping)                    T.0.98 / T.1.07
AutoCAD 2000 (+ Service Pack 1)                T.1.08
...
To my knowledge BricsCAD does not work with service packs.

I am not sure what the policy is regarding minor BricsCAD versions. But looking at the last two years there are two minor versions per year.
Last version 2013: V13.2.10.
Last version 2012: V12.2.18
Last version 2011: V11.4.6
Last version 2010: V10.5.6

Why are you looking for such a list?

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: 20.0
« Reply #23 on: April 04, 2014, 10:19:04 AM »
This variable can be useful too:
Code: [Select]
(getvar 'product) => Bricscad"

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1454
  • Marco
Re: 20.0
« Reply #24 on: April 04, 2014, 11:37:48 AM »
This variable can be useful too:
Code: [Select]
(getvar 'product) => Bricscad">>> Why are you looking for such a list?
I wanted to be sure to load the correct version of DOSlib using (getvar "_VERNUM"), here the version with (getvar 'product).
Thanks.
Code: [Select]
; 20140404 - 2.01
; BitFlg = 0 > unload + BitFlg = 1 > load + BitFlg = 2 > load first time
(defun ALE_Doslib (BitFlg / ArxNam PrcArc Is_64b)
  (cond
    ( (= 1 BitFlg) (or DOS_COPY (command "DosLib")) )
    ( (setq    ; restituisce "AMD64" anche su processore Intel e "x86" su 32 Bit
        PrcArc (getenv "PROCESSOR_ARCHITECTURE")
        Is_64b (if (and (< 1 (strlen PrcArc)) (eq "64" (substr PrcArc (1- (strlen PrcArc))))) "x64" "")
        ArxNam (if (getvar "PRODUCT") "Bricscad")  ;#BCFlg
                 (strcat "DOSLIB" (itoa (atoi (getvar "_VERNUM"))) Is_64b ".BRX")
                 (strcat "DOSLIB" (itoa (atoi (getvar "ACADVER"))) Is_64b ".ARX")
               )
      )
      (if DOS_COPY
        (and (= 0 BitFlg) (arxunload ArxNam nil))
        (if (= 2 BitFlg)
          (if (findfile ArxNam)
            (arxload ArxNam nil)
;_i__       (prompt "\nDOSLIB non trovato. Controlla le cartelle di installazione. ")
;|e|;       (prompt "\nDOSLIB not found. Verify your Asso Tools folders. ")
          )
        )
      )
    )
  )
)

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: 20.0
« Reply #25 on: April 04, 2014, 02:07:36 PM »
"Processor_architecture" is probably not the best way to determine if a 32 or 64 bits version of the CAD program is running. This has been discussed before on this the BricsCAD forum:
http://www.bricsys.com/common/support/forumthread.jsp?id=17883
From this discussion:
http://www.theswamp.org/index.php?topic=45770.0
it appears that "Processor_architecture" is the right test.