Author Topic: Help Desperately Needed  (Read 5667 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Help Desperately Needed
« Reply #15 on: July 02, 2010, 01:16:55 PM »
Jeff-

Thank you for the efforts.
Did you run this in acad 2011?
Yes, that screen shot was in 2011

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Help Desperately Needed
« Reply #16 on: July 02, 2010, 01:23:16 PM »
Second, where is it being appended to ??  The closest point I can see would be the "EntityColor = -1073741824", but that's not making any sense to me.  Of course, APPEND simply takes two lists and combines them into one and when Kerry dumped the object, did it not read the 'acadver' ??  Or perhaps I should ask, How is this Appending these two items together working ??
Third, why would this be appended to the "AutoCAD.AcCmColor" ??

I know all this isn't going to help much, but I am curious, this is getting interesting.
The (strcat) is appending the version to the string:  "AutoCAD.AcCmColor." so the line of code becomes
Code: [Select]
(vla-GetInterfaceObject (vlax-get-acad-object) "AutoCAD.AcCmColor.18")
when used in 2010 & 2011. This is the format required to get the AcCmColor object in 2010, 2011, and probably 2012. By using the (itoa(atoi)) it makes sure to get the proper integer. For 2007-2009 this was 17.....

nlanum

  • Guest
Re: Help Desperately Needed
« Reply #17 on: July 02, 2010, 01:27:36 PM »
Jeff-

Thank you for the efforts.
Did you run this in acad 2011?
Yes, that screen shot was in 2011



now I am more confused than ever. I could not get any of those tools to work in 2011.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Help Desperately Needed
« Reply #18 on: July 02, 2010, 01:37:27 PM »
here are a couple more files that I found.

EDI.fas

I have no idea what it is but in the folder I found it there was mention to the EDI.vlx file.
OK, the error you see is defined in the FAS file. The mnl file section that you included in the first post is supposed to override the definition. So it seems like the VLX or FAS files are being loaded again AFTER the MNL has loaded. Make sure your acaddoc.lsp does not have these included. Also your startup suite should not include them.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Help Desperately Needed
« Reply #19 on: July 02, 2010, 01:46:22 PM »
More info.....
Code: [Select]
;;; **** Replace function in VLX for compatability with 2010+
(defun ZF_GET-ACADCOLOR ()
  (VL-LOAD-COM)
  (setq ZF_ACADCOLOR
(vla-GetInterfaceObject
   (ZF_GET-ACAD-OBJECT)
   (strcat "AutoCAD.AcCmColor."
   (itoa (ATOI (GETVAR "ACADVER")))
   )
)
  )
)

;;; This is the original in the FAS, which is not usable(to us) code but shows where it's defined
;;; the above is set to overwrite this, providing this is not loaded afterwards
(defun ZF_GET-ACADCOLOR ()
(cond ZF_ACADCOLOR (
(cond T (
normal cond
nil
(VL-LOAD-COM )
(cond (= (ATOI (GETVAR "ACADVER")) 16) (
(cond (= (ATOI (GETVAR "ACADVER")) 17) (
(cond T (
normal cond
nil
(setq *ZF_LASTERROR "Incompatible AutoCAD Version")
normal cond
(EXIT )
normal cond
"AutoCAD.AcCmColor.17"
(setq ZF_ACADCOLOR (vla-GetInterfaceObject (ZF_GET-ACAD-OBJECT ) "AutoCAD.AcCmColor.16"))
normal cond

Hangman

  • Swamp Rat
  • Posts: 566
Re: Help Desperately Needed
« Reply #20 on: July 02, 2010, 01:56:25 PM »
< ... >
The (strcat) is appending the version to the string:  "AutoCAD.AcCmColor." so the line of code becomes
Code: [Select]
(vla-GetInterfaceObject (vlax-get-acad-object) "AutoCAD.AcCmColor.18")
when used in 2010 & 2011. This is the format required to get the AcCmColor object in 2010, 2011, and probably 2012. By using the (itoa(atoi)) it makes sure to get the proper integer. For 2007-2009 this was 17.....

Most interesting.  I have not tried accessing the AcCmColor so I have never run into this.  Thank you Jeff for the explanation, it is most enlightening for me.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

nlanum

  • Guest
Re: Help Desperately Needed
« Reply #21 on: July 02, 2010, 02:21:55 PM »
ok. I think things are starting to become a little less fuzzy.

How can I get these to load in the proper order?

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Help Desperately Needed
« Reply #22 on: July 02, 2010, 02:30:46 PM »
ok. I think things are starting to become a little less fuzzy.

How can I get these to load in the proper order?
OK, the error you see is defined in the FAS file. The mnl file section that you included in the first post is supposed to override the definition. So it seems like the VLX or FAS files are being loaded again AFTER the MNL has loaded. Make sure your acaddoc.lsp does not have these included. Also your startup suite should not include them.
If neither of these is the problem then try removing the FAS file from the support folder...although if it was there in 2010 and it worked, then it shouldn't matter in 2011 either. After that, I'm just not sure, because as I said it worked here just by unzipping and adding the path to them to my support paths.