PDA

View Full Version : Please Help


lanumcad
2009-08-03, 09:47 PM
I have used this for my menu bars for three years. now it is not working in AutoCAD 2010.

I get this error: Application ERROR: Invalid type sent as command input

here is the lisp:

(SetQ *ZFDEBUG T )

;;Defaults
(SetQ
*EDI-TRAYLAYER "EDI-Tray"
*EDI-DEFAULTTREYWID 18.0
*EDI-POINTTOLERANCE 0.0000001
)

;;Load Application
(Load "EDI.vlx" )

;;;(Defun C:Test ()
;;; (SetError )
;;;
;;; (EDI_Insert
;;; ;Block Name
;;; "Test Block"
;;; ;Scale: Real or nil for Prompt
;;; 1.0
;;; ;Angle: Radians or nil for prompt
;;; nil
;;; ;Prop: Layer Color Linetype Lineweight Plotstyle, nil for Current
;;; (List "SS-Device" acByLayer "BYLAYER" acLnWtByLayer "BYLAYER" )
;;; ;Attributes: ("TAG" . "TEXT") or nil for Default T for Prompt
;;; '( ("1" . "Att1") ("2" . "Att2") ("5" . "Att5") )
;;; ;Attributes Angle: ("TAG" . RADIANS) or nil for Default, T for All=0.0
;;; '( ("1" . 0.0) ("2" . 0.0) ("3" . 0.0) )
;;; ;Dynamic Properties: ("NAME" . VALUE) or nil for Default
;;; nil
;;; )
;;;
;;; (ResetError )
;;; (TerPri )
;;; (Prin1 )
;;;)


;;******SC DEVICES*********************************************************************

;;Wall Phone VOIP
(Defun C:WALLPHONEVOIP ()
(SetError )
(EDI_Insert
;Block Name
"Data Voice Outlet"
;Scale: Real or nil for Prompt
(If (= (GetVar "DIMSCALE") 0.0) nil (GetVar "DIMSCALE") )
;Angle: Radians or nil for prompt
0.0
;Props: List of Properties or nil for Current
;(List Layer Color Linetype Lineweight Plotstyle )
(List "SC-Device" acByLayer "BYLAYER" acLnWtByLayer "BYLAYER" )
;Attribute Values: List of Dotted-Pairs or nil for Default, T for Prompt
;'( ("TAG" . "VALUE") )
'( ("TAG" . "W") )
;Attribute Angles: List of Dotted-Pairs or nil for Default, T for All=0.0
;'( ("TAG" . RADIANS) )
T
;Dynamic Properties: List of Dotted-Pairs or nil for Default
;'( ("NAME" . VALUE) )
'( ("Type" . "Data Only") )
)
(ResetError )
(TerPri )
(Prin1 )
)

;;Wall Phone Analog
(Defun C:WALLPHONEANALOG ()
(SetError )
(EDI_Insert
;Block Name
"Data Voice Outlet"
;Scale: Real or nil for Prompt
(If (= (GetVar "DIMSCALE") 0.0) nil (GetVar "DIMSCALE") )
;Angle: Radians or nil for prompt
0.0
;Props: List of Properties or nil for Current
;(List Layer Color Linetype Lineweight Plotstyle )
(List "SC-Device" acByLayer "BYLAYER" acLnWtByLayer "BYLAYER" )
;Attribute Values: List of Dotted-Pairs or nil for Default, T for Prompt
;'( ("TAG" . "VALUE") )
'( ("TAG" . "W") )
;Attribute Angles: List of Dotted-Pairs or nil for Default, T for All=0.0
;'( ("TAG" . RADIANS) )
T
;Dynamic Properties: List of Dotted-Pairs or nil for Default
;'( ("NAME" . VALUE) )
'( ("Type" . "Voice Only") )
)
(ResetError )
(TerPri )
(Prin1 )
)

;;Furniture Outlet Data-Voice
(Defun C:FOUTLETDV ()
(SetError )
(EDI_Insert
;Block Name
"Data Voice Outlet"
;Scale: Real or nil for Prompt
(If (= (GetVar "DIMSCALE") 0.0) nil (GetVar "DIMSCALE") )
;Angle: Radians or nil for prompt
0.0
;Props: List of Properties or nil for Current
;(List Layer Color Linetype Lineweight Plotstyle )
(List "SC-Device" acByLayer "BYLAYER" acLnWtByLayer "BYLAYER" )
;Attribute Values: List of Dotted-Pairs or nil for Default, T for Prompt
;'( ("TAG" . "VALUE") )
'( ("TAG" . "*") )
;Attribute Angles: List of Dotted-Pairs or nil for Default, T for All=0.0
;'( ("TAG" . RADIANS) )
T
;Dynamic Properties: List of Dotted-Pairs or nil for Default
;'( ("NAME" . VALUE) )
'( ("Type" . "Data Voice") )
)
(ResetError )
(TerPri )
(Prin1 )
)

;;Furniture Outlet Data Only
(Defun C:FOUTLETD ()
(SetError )
(EDI_Insert
;Block Name
"Data Voice Outlet"
;Scale: Real or nil for Prompt
(If (= (GetVar "DIMSCALE") 0.0) nil (GetVar "DIMSCALE") )
;Angle: Radians or nil for prompt
0.0
;Props: List of Properties or nil for Current
;(List Layer Color Linetype Lineweight Plotstyle )
(List "SC-Device" acByLayer "BYLAYER" acLnWtByLayer "BYLAYER" )
;Attribute Values: List of Dotted-Pairs or nil for Default, T for Prompt
;'( ("TAG" . "VALUE") )
'( ("TAG" . "*") )
;Attribute Angles: List of Dotted-Pairs or nil for Default, T for All=0.0
;'( ("TAG" . RADIANS) )
T
;Dynamic Properties: List of Dotted-Pairs or nil for Default
;'( ("NAME" . VALUE) )
'( ("Type" . "Data Only") )
)
(ResetError )
(TerPri )
(Prin1 )
)

;;Furniture Outlet Voice Only
(Defun C:FOUTLETV ()
(SetError )
(EDI_Insert
;Block Name
"Data Voice Outlet"
;Scale: Real or nil for Prompt
(If (= (GetVar "DIMSCALE") 0.0) nil (GetVar "DIMSCALE") )
;Angle: Radians or nil for prompt
0.0
;Props: List of Properties or nil for Current
;(List Layer Color Linetype Lineweight Plotstyle )
(List "SC-Device" acByLayer "BYLAYER" acLnWtByLayer "BYLAYER" )
;Attribute Values: List of Dotted-Pairs or nil for Default, T for Prompt
;'( ("TAG" . "VALUE") )
'( ("TAG" . "*") )
;Attribute Angles: List of Dotted-Pairs or nil for Default, T for All=0.0
;'( ("TAG" . RADIANS) )
T
;Dynamic Properties: List of Dotted-Pairs or nil for Default
;'( ("NAME" . VALUE) )
'( ("Type" . "Voice Only") )
)
(ResetError )
(TerPri )
(Prin1 )

lanumcad
2009-08-03, 09:55 PM
I also get this error:

incompatible autocad version

I'm just insert blocks from a menu button. Why the problem????

RobertB
2009-08-04, 01:04 AM
My guess is the VLX file you are loading.

lanumcad
2009-08-04, 06:33 PM
Is there a way to fix the VLX file?

rkmcswain
2009-08-04, 07:08 PM
Is there a way to fix the VLX file?

Fix the error in the source code and recompile to VLX

lanumcad
2009-08-04, 10:48 PM
I'm pretty new to customization, so please forgive my "dumb" question.

Where is the source code? And what kind of error am I looking for?

Thanks

rkmcswain
2009-08-04, 11:30 PM
Where is the source code? And what kind of error am I looking for?

Thanks

Whoever created the VLX file started with autolisp code, which is plain ASCII text. The VLX is a binary file that cannot be edited. You need to get with the author of this code and have him/her fix this.

lanumcad
2009-08-04, 11:39 PM
That guy is long gone to place far, far, far away......
I guess I am hosed

lanumcad
2009-08-04, 11:49 PM
is there a way to recreate the source file???

thanks rkmcswain. I enjoy your blog and am a daily reader.

rkmcswain
2009-08-05, 12:01 AM
is there a way to recreate the source file??? No, that is part of the reason VLX files are created - to protect the source code.

You know - I just chimed in regarding the VLX file itself. Are you sure this is where the problem lies with regard to the entire routine?


thanks rkmcswain. I enjoy your blog and am a daily reader. Thanks.

RobertB
2009-08-05, 12:32 AM
You know - I just chimed in regarding the VLX file itself. Are you sure this is where the problem lies with regard to the entire routine?Good point. There isn't much to the code other than the wrapped calls to functions obviously defined by the VLX. However, since the OP didn't run a debug step-by-step, we are just guessing.

lanumcad
2009-08-05, 04:32 PM
all I know is that this work just fine in Acad 2007 and does not work in Acad 2010.

Thanks anyways.

rkmcswain
2009-08-05, 04:42 PM
Can you post (or email me) the VLX file?

RobertB
2009-08-05, 05:47 PM
all I know is that this work just fine in Acad 2007 and does not work in Acad 2010.Load your code in the VLIDE, set a breakpoint at the first statement in one of the main functions, and then step thru the code until you get to the error.

Or set the VLIDE to break on error, run the code, and use the last error button to locate the offending statement.

lanumcad
2009-08-05, 05:59 PM
I sent the file to your yahoo address.

Thank you

rkmcswain
2009-08-05, 07:31 PM
After looking at the code, Robert nailed it way back here... It's the call to the (EDI_INSERT) function that is failing. This function is defined in the VLX file, for which we don't have the source code, so there isn't much anyone can do at this point.

The only salvageable component is the DCL (dialog) code, as this is stored in plain text in the VLX file (open it in Notepad to see)

lanumcad
2009-08-05, 08:07 PM
Much thanks.

Onward and upward.

lanumcad
2009-08-10, 10:12 PM
I have the VLX file de-compiled if anybody wants to take a crack at finding the problem.

lanumcad
2009-08-13, 07:10 PM
Anybody?......no takers?....nobody wants to show off?

rkmcswain
2009-08-13, 07:36 PM
I got your email, but I just got back from vacation... I'll try to take a look a bit later....

lanumcad
2009-08-14, 02:11 AM
Thank you so much.

rkmcswain
2009-08-19, 06:01 PM
I have the VLX file de-compiled
Sorry, but what you sent me is still not autolisp code.
Can't do any more with that, than the VLX itself.