Author Topic: AutoCAD version files.  (Read 5793 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
AutoCAD version files.
« on: January 19, 2005, 02:01:47 PM »
Another one...

Some of users in our offices open drawing by double-cliking in windows explorer...

But some drawing was made in incompatible version 2002 or 2004 or 2005

so the question is..is there any way to detect the version of files before opening ?

If yes, How can I tell to windows to start 2002, 2004 or 2005 ??


thanks.
Keep smile...

danny

  • Guest
AutoCAD version files.
« Reply #1 on: January 19, 2005, 02:17:57 PM »
maybe under the properties it will say what version.  to open it in windows, right click on the file and go to "open with" then choose the correct program

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
AutoCAD version files.
« Reply #2 on: January 19, 2005, 02:18:34 PM »
I don't think there is a way to do that WITHOUT another program installed to intercept the call.

That sounds like a very interesting program that could be written, if anyone were inclined.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Jassper

  • Guest
AutoCAD version files.
« Reply #3 on: January 19, 2005, 02:32:27 PM »
http://theswamp.org/phpBB2/viewtopic.php?t=1412&highlight=spyware

When I use "AutoCAD Version Explorer" it will show what revision of CAD created it. See the above thread for more info.

Little :O)

MikePerry

  • Guest
AutoCAD version files.
« Reply #4 on: January 19, 2005, 06:09:26 PM »
Hi

Give the following web search results a try -

DWGicon - 26 Results

Have a good one, Mike

paulmcz

  • Bull Frog
  • Posts: 202
AutoCAD version files.
« Reply #5 on: January 19, 2005, 07:38:13 PM »

Andrea

  • Water Moccasin
  • Posts: 2372
AutoCAD version files.
« Reply #6 on: January 19, 2005, 10:18:34 PM »
thanks all.. i have downloaded all....and tried all....
but no software can open the good AutoCAD version when double-click on a file.

also I had bad experience trying
http://www.cadwerx.net/Products/CadXplorer/CxCadXplorer.asp

Need to restart WinXP in save mode to remove...
be advised...

So if there is no software that can help me with this...I need to create one.
but don't realy know how to detect the version of a file...hmmm...!!?

;-)
Keep smile...

ronjonp

  • Needs a day job
  • Posts: 7529
AutoCAD version files.
« Reply #7 on: January 20, 2005, 09:38:38 AM »
I tried that DWGIcon and it works great :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

whdjr

  • Guest
AutoCAD version files.
« Reply #8 on: January 20, 2005, 11:09:50 AM »
This is not as easy as double clicking, but if right-click on the filename in explorer and then left-click on "Open With" it gives you all the versions of your CAD program to choose from.

Crank

  • Water Moccasin
  • Posts: 1503
Re: AutoCAD version files.
« Reply #9 on: January 21, 2005, 02:29:58 PM »
Quote from: Andrea
...

so the question is..is there any way to detect the version of files before opening ?

If yes, How can I tell to windows to start 2002, 2004 or 2005 ??
...


You can make a program that looks at the first characters of the file. (open a .dwg with wordpad and you can read someting like AC1018)
This string contains the version number of the .dwg-file.
With that information the program can launch the right version of autocad.

I don't have all the codes, but I believe AC1018=Autocad2004 and AC1015=Autocad2000.
Autocad 2004 and 2005 use the same file format. And 2000, 2000i and 2002 also have the same file format. So you only need to install 2 versions.
Vault Professional 2023     +     AEC Collection

Andrea

  • Water Moccasin
  • Posts: 2372
AutoCAD version files.
« Reply #10 on: January 21, 2005, 09:21:00 PM »
thanks Crank...

But if I have AutoCAD 2004 and 2005 in same PC...

you mean that it would be not possible for windows or any VB to detect with what version to start the file ?


hmmm....
Keep smile...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #11 on: January 22, 2005, 12:05:21 AM »
Modify to suit ...
Code: [Select]

(defun GetDwgVersion ( DwgName / Path Handle Header )
   (if (setq Path (FindFile DwgName))
      (cond
         (  (setq Handle (open Path "r"))
            (setq Header (substr (read-line Handle) 1 6))
            (close Handle)
            (cond
               ((eq Header "AC1018") 16)
               ((eq Header "AC1015") 15)
               ((eq Header "AC1014") 14)
               ((eq Header "AC1012") 13)
               ((eq Header "AC1009") 12)
               ((eq Header "AC1006") 10)
               ((eq Header "AC1004") 9)
               ((eq Header "AC1002") 2.6)
               ((eq Header "AC1.50") 2.05)
               (t 0) ;; 0 = undeterminable
            )
         )
      )
   )
)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Crank

  • Water Moccasin
  • Posts: 1503
AutoCAD version files.
« Reply #12 on: January 22, 2005, 06:16:42 AM »
@ MP:

I don't think Lisp should be used for this.

I don't know VB or C, but a tool that starts up when a file has the .dwg extension is what Andrea needs.
This tool then can launch the right version of Autocad.

@ Andrea:

No I don't think so, but why do you want to choose between Autocad 2004 and 2005? They have the same file format and any well wriiten application for 2004 should also work on 2005. (I haven't seen any seen any old application that didn't work on 2005 :roll: ;) )
Vault Professional 2023     +     AEC Collection

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #13 on: January 22, 2005, 08:54:10 AM »
Quote from: Crank
@ MP:

I don't think Lisp should be used for this.

I don't know VB or C, but a tool that starts up when a file has the .dwg extension is what Andrea needs.
This tool then can launch the right version of Autocad.

@ Andrea:

No I don't think so, but why do you want to choose between Autocad 2004 and 2005? They have the same file format and any well wriiten application for 2004 should also work on 2005. (I haven't seen any seen any old application that didn't work on 2005 :roll: ;) )

I agree, that's why I offered the words "Modify to suit" :)

Subtitle: It was late and I was too tired / lazy to do it myself.

Hang on I'll whip up a quick VB variation ...
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #14 on: January 22, 2005, 09:07:47 AM »
Quick ^ Dirty VB function:
Code: [Select]

Function GetDwgVersion(dwgName As String) As Single

    Dim handle As Integer, _
        header As String * 6
       
    handle = FreeFile
   
    On Error Resume Next
   
    Open dwgName For Binary Shared As #handle
   
    If Err.Number Then
        Err.Clear
        GetDwgVersion = 0
    Else
        Get #handle, , header
        Close #handle
        Select Case header
            '' I don't have AutoCAD 2005 installed
            '' so someone else will have to provide
            '' the signature for said version
            '' case "AC10??": GetDwgVersion = ??
            Case "AC1018": GetDwgVersion = 16
            Case "AC1015": GetDwgVersion = 15
            Case "AC1014": GetDwgVersion = 14
            Case "AC1012": GetDwgVersion = 13
            Case "AC1009": GetDwgVersion = 12
            Case "AC1006": GetDwgVersion = 10
            Case "AC1004": GetDwgVersion = 9
            Case "AC1002": GetDwgVersion = 2.6
            Case "AC1.50": GetDwgVersion = 2.05
            Case Else: GetDwgVersion = 0
        End Select
    End If

End Function

A calling function could then be responsible for deciding what to do based on the dwging version. Crazy me I'd just run AutoCAD 2005 and worry not about the version number. Maybe I should go back and read the entire thread to see why this is even needed ...

<Be gentle guys, just woke up, havn't even had a coffee yet>

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
AutoCAD version files.
« Reply #15 on: January 22, 2005, 09:11:27 AM »
Quote from: MP
<Be gentle guys, just woke up, havn't even had a coffee yet>:)

No coffee yet!! I can't even log in without coffee. :D

Interesting code there MP.
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #16 on: January 22, 2005, 09:16:16 AM »
BRB (going to get a big ol' mug) ...
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #17 on: January 22, 2005, 09:38:37 AM »
mmmm, coffee. Nothing like a fresh brew in my favorite 16oz cup :)

Anyway ... the abbreviated version of what I do at work, where I run r14, 2000 and 2004 is, generally speaking, I fire up an instance of 2004 and then shut her down. From that point forward if I double click a drawing in explorer etc. 2004 fires up. Also, 2004 is configured to save to the 2000 format, so for me, the whole issue is kinda moot (though it's nice to have code for these determinations). Our users run 2000 (our projects span MANY years - we start and finish a project with the same version). I have the multiple versions because I have to make sure code I write works accross different platforms.

Incidentally I had written that LISP function to prevent XREFing drawings which were incompatible with the version of AutoCAD running. Like everyone else on the planet, we run a custom XREF command that allows multiple attaches, detaches ad nauseum.

Babble ... when is this coffee going to take?

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
AutoCAD version files.
« Reply #18 on: January 22, 2005, 09:45:37 AM »
Quote from: MP
(our projects span MANY years - we start and finish a project with the same version).

Now that must take some discipline on the drafters part. :D Or do you limit them to only one version on their machine.
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #19 on: January 22, 2005, 09:48:24 AM »
They only have one version.

We must protect them from themselves.

:twisted:

Mr. (Randy) CADaver may have some experience in this regard, lol.

Note that I don't mean Randy in the British way.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
AutoCAD version files.
« Reply #20 on: January 22, 2005, 10:00:15 AM »
Well being on the other end (as in drafter) I know  where you're coming from but, some of us do know what we are doing. :D

*** you manager types are all alike, "those drafters know nothing, we must watch their every move" ***

Just kidding........  BTW.
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #21 on: January 22, 2005, 10:06:10 AM »
Quote from: Mark Thomas
Well being on the other end (as in drafter) I know  where you're coming from but, some of us do know what we are doing. :D

*** you manager types are all alike, "those drafters know nothing, we must watch their every move" ***

Just kidding........  BTW.

:lol:

Well I wish it weren't the case, but having been in the CADD Support group at my company now awhile (will be 10 years in May) the sad reality is that the sharp ones probably are in the order of 1 per 20 (I'm being generous). Believe me, it would be great if we didn't have to babysit, audit, fix ... I don't enjoy being a CADD Janitor -- I just want to write fun and clever programs man!
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
AutoCAD version files.
« Reply #22 on: January 22, 2005, 10:12:02 AM »
Quote
the sad reality is that the sharp ones probably are in the order of 1 per 20 (I'm being generous)

Really! That many, wow!!
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD version files.
« Reply #23 on: January 22, 2005, 10:16:23 AM »
My work here is done: Another thread completely hijacked. Sorry Andrea! :oops:
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

CADaver

  • Guest
AutoCAD version files.
« Reply #24 on: January 22, 2005, 10:51:33 AM »
Quote from: MP
They only have one version.
We must protect them from themselves.
:twisted:
Mr. (Randy) CADaver may have some experience in this regard, lol.
We control everything from the network and from local desktop icons with client/contract specific setups.  A user clicks on a client/contract icon and he's loaded the proper version with the proper settings and profile.

The users are free to use whatever they wish as long as the results are the same, but there's the rub.  If they use company stuff and it blows up, it's my fault, I'll take the heat.  But if a user ignores our shortcuts in favor of his own methods, he'll take the heat (considerable heat) for any blow up.  We try to make it easier (less painful) to comply, than not.


The only drawback I have to our current system is that we limit one session of ACAD at a time.  If I'm running an R2002 project, and need to review something on an R2005 contract or another R2002 project, I have to exit the current R2002 session first.  

I've solved it by adding another network link in my office and firing up my laptop when I need the additional session.  I've had a couple of strange looks (not all that rare at all) when they see my laptop propped up on the destop's keyboard, and me running two mice (mice? mouses? meece? mooses??)


Quote from: MP
Note that I don't mean Randy in the British way.
Even if you did, it'd be one of the nicer things I've been called around here ;)