ObjectDCL & 2005

Discussion in 'AutoCAD' started by David_Lister, Jan 25, 2005.

  1. David_Lister

    David_Lister Guest

    I recently upgraded our Lisp programming to work in 2005 (very few changes were necessary). However, I have witnessed some confounding behavior in programs that utilize ObjectDCL (2.01 or 3.0) I know many people are familiar with this program, so I thought I'd see if anyone else has had similar problems.

    (Note: I started by using the ObjectDCL2005.arx file with 2005.)

    The specific problem that I have noticed is this: If you use an ObjectDCL Dialog Box to fire off another Lisp routine (compiled or not), the "change" and "chprop" commands DO NOT work properly. Example:

    (command "change" Entity_Name "" "p" "la" "1" "")

    ...simple changing of an entity to layer 1 - not elegant, but should be legal...

    When this is attempted, the double quote ("") AFTER Entity_Name is not evaluated, which obviously causes the program to crash. Strange...

    Run the program WITHOUT firing it from an ObjectDCL Dialog Box and it runs fine. Stranger...

    Luis Esquivel mentioned in an October 2004 post that he was not using the ObjectDCL2005.arx, but rather the ObjectDCL2004.arx file instead inside AutoCAD 2005. So I tried this and now the SAME program works just fine. Hmm...

    I have seen a couple other strange anomalies but this post is already getting too long. Maybe I don't have the right ObjectDCL2005.arx file? Mine is dated 02/17/04. Anyone successfully using ObjectDCL2005.arx with AutoCAD 2005?



    David Lister
    Mikron Industries
     
    David_Lister, Jan 25, 2005
    #1
  2. I have not use the arx file for 2005 on autocad 2005, I had several errors before using the grid control, that end up using objectdcl2004.arx, and it is working just fine.

    The date you mention is the same I have.

    Luis Esquivel
    http://www.draftteam.com
     
    Luis Esquivel, Jan 26, 2005
    #2
  3. David,
    Check the "EventInvoke" property of the control you are firing the lisp
    from, and make sure it is set to 1....

    Here is a snippet from the help:

    ------------------------------------------
    A setting of 0 will allow the control to keep it's focus. A setting of 1
    will allow the (Command ...) Lisp funcion to be used, but will also shift
    the focus to the Command Line (Defaulted for the Modeless and Dockable
    forms). 1 - Allow (Command...) will NOT work in a Config Tab Dialog.
    ------------------------------------------

    Hope this helps...

    Joel Roderick
    www.watertechnologyinc.com
     
    Joel Roderick, Jan 26, 2005
    #3
  4. David_Lister

    David_Lister Guest

    Joel, I neglected to mention that the program is fired off AFTER I close the (modal) Dialog Box, so there shouldn't be any problems regarding the focus on the command line.

    The ObjectDCL Interface that I use to fire off these programs works great in 2000, 2000i, 2002 and 2004. It just refuses to work specifically with programs that utilize the "change" and "chprop" functions in AutoCAD 2005. That's what is so strange.

    Here is some example code that will NOT work in 2005 using the ObjectDCL2005.arx file.

    [The Code below belongs to a file called Test.lsp]
    (defun c:Test () ;; This function simply loads and displays the modal dialog box.
    (Odcl_LoadProject "c:/Temp/Test.odc" T) ;; Load the ObjectDCL Project
    (Odcl_Form_Show "c:/Temp_Test.odc" "Test_Dialog") ;; Display the Dialog Box.
    )

    (defun c:Test_Dialog_Change_Layer_OnClicked () ;; On Click event to close the Dialog Box and launch Change_Layer.lsp
    (Odcl_Form_Close "c:/Temp/Test.odc" "Test_Dialog") ;; Close the Dialog Box.
    (load "c:/Temp/Change_Layer") ;; Load the Change_Layer.lsp from the C:/Temp directory.
    (c:Change_Layer) ;; Run the Change_Layer routine.
    )
    [End of Test.lsp]

    [The Code below belongs to Change_Layer.lsp]
    (defun c:Change_Layer ()
    (setq SS (ssget)) ;; Allow user to select some entities to change to Layer 1.
    (command "change" ss "" "p" "la" "1" "") ;; Change the selected entities to Layer 1.
    )
    [End of Change_Layer.lsp]

    Assuming you have an ObjectDCL Dialog Box called Test.odc and it is programmed to close itself down and fire of "Change_Layer.lsp", the line:

    (command "change" ss "" "p" "la" "1" "")

    ...will crash the program. This scenario works on my computer if I have the ObjectDCL2005.arx file loaded. However, if I use the ObjectDCL2004.arx file, it works just fine. I have simulated this problem with dozens of programs and it fails every time.

    If anyone has any ideas on this one, I'd be grateful to hear them. Until then, I'm going to have to stick with the ObjectDCL2004.arx file and ObjectDCL 2.01 for Dialog Box creation.

    David Lister
    Mikron Industries
     
    David_Lister, Jan 26, 2005
    #4
  5. David_Lister

    David_Lister Guest

    Quick note on my last post... ...the line:

    (Odcl_Form_Show "c:/Temp_Test.odc" "Test_Dialog") ;; Display the Dialog Box.

    ...should read:

    (Odcl_Form_Show "c:/Temp/Test.odc" "Test_Dialog") ;; Display the Dialog Box.

    David Lister
    Mikron Industries
     
    David_Lister, Jan 26, 2005
    #5
  6. David_Lister

    Daron Guest

    David,

    i noticed your use of "change" did not have a "." before the command. this
    may not be it, but i have noticed in 2004/2005 unless you do this, some
    commands act strange. it's a good practice anyway in case someone undefines
    a command you are trying to use.

    try (command ".change" Entity_Name "" "p" "la" "1" "")

    daron
     
    Daron, Jan 26, 2005
    #6
  7. I thought I had the latest arx, its ObjectDCL2004.arx dated 9/1/04.
    I have objkectDCL 3.0.
    Is there a new version that has a 2005 in the arx name?
    I thought I watrched this as close as anyone.

    There are worse things than that though, you just have to try a couple approaches til you find one that works.
    You do pay a small price in getting used to ODCL (sometimes not so small), but I would have to learn C to do what my
    progs do with lisp and ODCL. VB is just not as good as lisp at many things.

    David_Lister <>
    |>I recently upgraded our Lisp programming to work in 2005 (very few changes were necessary). However, I have witnessed some confounding behavior in programs that utilize ObjectDCL (2.01 or 3.0) I know many people are familiar with this program, so I thought I'd see if anyone else has had similar problems.
    |>
    |>(Note: I started by using the ObjectDCL2005.arx file with 2005.)
    |>
    |>The specific problem that I have noticed is this: If you use an ObjectDCL Dialog Box to fire off another Lisp routine (compiled or not), the "change" and "chprop" commands DO NOT work properly. Example:
    |>
    |>(command "change" Entity_Name "" "p" "la" "1" "")
    |>
    |>..simple changing of an entity to layer 1 - not elegant, but should be legal...
    |>
    |>When this is attempted, the double quote ("") AFTER Entity_Name is not evaluated, which obviously causes the program to crash. Strange...
    |>
    |>Run the program WITHOUT firing it from an ObjectDCL Dialog Box and it runs fine. Stranger...
    |>
    |>Luis Esquivel mentioned in an October 2004 post that he was not using the ObjectDCL2005.arx, but rather the ObjectDCL2004.arx file instead inside AutoCAD 2005. So I tried this and now the SAME program works just fine. Hmm...
    |>
    |>I have seen a couple other strange anomalies but this post is already getting too long. Maybe I don't have the right ObjectDCL2005.arx file? Mine is dated 02/17/04. Anyone successfully using ObjectDCL2005.arx with AutoCAD 2005?
    |>
    |>
    |>
    |>David Lister
    |>Mikron Industries

    James Maeding
    jmaeding at hunsaker dot com
    Civil Engineer/Programmer
     
    James Maeding, Jan 27, 2005
    #7
  8. David_Lister

    David_Lister Guest

    James, there is an ObjectDCL2005.arx file, but as stated in the previous posts, both Luis and I are not using it in AutoCAD 2005. Instead, I have been using the ObjectDCL2004.arx file and it appears to work better for me.

    Funny though, my ObjectDCL2004.arx file has a date of 04/11/03. Your version appears to be newer. I have been unable to design dialog boxes with ObjectDCL 3.0 that work in AutoCAD 2005 using this ObjectDCL2004.arx file. From your post I'm assuming you are designing dialog boxes in 3.0 and they're working fine AutoCAD 2005 using the ObjectDCL2004.arx with a date of 09/01/04. If that is the case, I'd love to get that file from you.

    David Lister
    Mikron Industries
    dave_lister@<remove spam>mikronvinyl.com
     
    David_Lister, Jan 27, 2005
    #8
  9. David_Lister

    David_Lister Guest

    Daron, I wish I were optimistic on this one. But hey, I'll give it a try anyway and let you know. Thanks.

    David Lister
    Mikron Industries
     
    David_Lister, Jan 27, 2005
    #9
  10. And a copy to me too...please

    My objectdcl2004.arx is dated: 6/17/2004 1:49PM

    (eq (vl-file-size (findfile "objectdcl2004.arx")) 1204224)

    It's the version you have the same size as this one?

    Thank you,
    Luis Esquivel
    http://www.draftteam.com
     
    Luis Esquivel, Jan 27, 2005
    #10
  11. David,

    I did several tests... using the same version of ODCL you have, my autocad does not crash.

    I also tried with visual lisp/activex to change the layer, works with that.

    Also, change the option Joel mentioned and works but you have to close the dialog manually and that is not a good way.

    The last try was to use VL-CMDF instead of COMMAND and is working!

    Give it a try, please.

    The only reason I stoped using ODCL 2005, was because one of my application is using the control GRID and was having a some problems...

    Luis Esquivel
    http://www.draftteam.com
     
    Luis Esquivel, Jan 27, 2005
    #11
  12. David_Lister

    David_Lister Guest

    Luis, I thought yours was dated 04/11/03? In any event, that is the one that was e-mailed to me from Chad (at 3rd Day). File size is 798720.

    At last check NO ObjectDCL related .arx files were available on the web site (ObjectDCL.com) for download. I know there is a link to the 2005 version, but it is dead.

    David Lister
    Mikron Industries
     
    David_Lister, Jan 27, 2005
    #12
  13. David_Lister

    David_Lister Guest

    I'll give it another try with the same code I used in the example above. Could you do me a favor and shoot me over the ObjectDCL2005.arx file that you are using so I know everything is the same? I'm also going to assume you're using 2.01 to create the dialog box. Thanks.

    David Lister
    Mikron Industries
    dave_lister@<remove spam>mikronvinyl.com
     
    David_Lister, Jan 27, 2005
    #13
  14. David_Lister

    domenico Guest

    Chad, please, tell us something . . .

    Could you do me a favor and shoot me over the ObjectDCL2005.arx file that
    you are using so I know everything is the same? I'm also going to assume
    you're using 2.01 to create the dialog box. Thanks.
     
    domenico, Jan 27, 2005
    #14
  15. File version is: 2.0.1
    ObjectDCL 3.0
    ObjectDCL2005.arx = 2/17/2004

    I was going to use VL-CMDF ... but did not work.

    I noticed if I kept command or vl-cmdf.... and use just the part

    (vl-cmdf "_.change")

    The command works.... by feeding the next options.

    And I don't understand why is showing a 1 [integer of one] on the command prompt.

    hth
    Luis Esquivel
    http://www.draftteam.com
     
    Luis Esquivel, Jan 27, 2005
    #15
  16. David_Lister

    David_Lister Guest

    ...don't know what to say, but my programs appear to be working fine now!! I placed ObjectDCL2005.arx (02/17/04) back into the "Startup Suite" and started firing off different programs that were crashing before and everything went off without a hitch. Odd.

    I spent 20 hours on this problem (Monday & Tuesday) and even e-mailed Chad at 3rd Day. I'm in the middle of upgrading 30 work stations to 2005 and starting to get a bit anxious. I'm going to run a couple dozen more programs and make sure things are running smoothly. (By the way, I checked my machine for viruses, even rebooted and tried all the usual troubleshooting.)

    At Mikron we call this phenomenon WADS (or Weird AutoCAD Displacement Syndrome) In any event, I'm glad to be back in the game here. I've been using ObjectDCL since December 2000 when it was first released and think it's a pretty cool app, despite some of its quirks.

    David Lister
    Mikron Industries
     
    David_Lister, Jan 27, 2005
    #16
  17. ok mine is bigger!
    Command: (vl-file-size (findfile "objectdcl2004.arx"))
    1216512

    So I might have the latest arx, I did have Chad fix something for me so maybe its a newer build.
    I'll send it you guys since you own seats of the software. Backup your old arx's of course.
    email me David so I can reply
    thx

    David_Lister <>
    |>..don't know what to say, but my programs appear to be working fine now!! I placed ObjectDCL2005.arx (02/17/04) back into the "Startup Suite" and started firing off different programs that were crashing before and everything went off without a hitch. Odd.
    |>
    |>I spent 20 hours on this problem (Monday & Tuesday) and even e-mailed Chad at 3rd Day. I'm in the middle of upgrading 30 work stations to 2005 and starting to get a bit anxious. I'm going to run a couple dozen more programs and make sure things are running smoothly. (By the way, I checked my machine for viruses, even rebooted and tried all the usual troubleshooting.)
    |>
    |>At Mikron we call this phenomenon WADS (or Weird AutoCAD Displacement Syndrome) In any event, I'm glad to be back in the game here. I've been using ObjectDCL since December 2000 when it was first released and think it's a pretty cool app, despite some of its quirks.
    |>
    |>David Lister
    |>Mikron Industries

    James Maeding
    jmaeding at hunsaker dot com
    Civil Engineer/Programmer
     
    James Maeding, Jan 27, 2005
    #17
  18. ok, sent arx to both you guys.
    Can you email me the 2005 one? I am caught naked.

    David_Lister <>
    |>..don't know what to say, but my programs appear to be working fine now!! I placed ObjectDCL2005.arx (02/17/04) back into the "Startup Suite" and started firing off different programs that were crashing before and everything went off without a hitch. Odd.
    |>
    |>I spent 20 hours on this problem (Monday & Tuesday) and even e-mailed Chad at 3rd Day. I'm in the middle of upgrading 30 work stations to 2005 and starting to get a bit anxious. I'm going to run a couple dozen more programs and make sure things are running smoothly. (By the way, I checked my machine for viruses, even rebooted and tried all the usual troubleshooting.)
    |>
    |>At Mikron we call this phenomenon WADS (or Weird AutoCAD Displacement Syndrome) In any event, I'm glad to be back in the game here. I've been using ObjectDCL since December 2000 when it was first released and think it's a pretty cool app, despite some of its quirks.
    |>
    |>David Lister
    |>Mikron Industries

    James Maeding
    jmaeding at hunsaker dot com
    Civil Engineer/Programmer
     
    James Maeding, Jan 27, 2005
    #18
  19. I sent to you the copy I got it from Chad...
     
    Luis Esquivel, Jan 27, 2005
    #19
  20. David_Lister

    David Allen Guest

    wierd, I just noticed that I have 2 files
    both are internal version 1.0.0.1 for 2004?

    06/15/2004 09:02 AM 1,269,760 ObjectDCL2004.arx
    02/17/2004 08:43 AM 1,265,664 ObjectDCL2005.arx

    I wonder which is correct?

    Luis Esquivel <>
    |>And a copy to me too...please
    |>
    |>My objectdcl2004.arx is dated: 6/17/2004 1:49PM
    |>
    |>(eq (vl-file-size (findfile "objectdcl2004.arx")) 1204224)
    |>
    |>It's the version you have the same size as this one?
    |>
    |>Thank you,
    |>Luis Esquivel
    |>http://www.draftteam.com


    David
     
    David Allen, Jan 28, 2005
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.