TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: commodore on January 13, 2009, 10:03:21 AM
-
Is there something wrong with my code or with the AecXBase.tlb library that when I run this I immediately get 2 "Assigment to protected symbol:" errors on "paec-get-linewieght" and "paec-put-lineweight"
It does not matter what prefix I try.
I am using MEP2008
Anyone else care to try and tell me their results?
(vlax-Import-Type-Library
:tlb-filename "AecXBase.tlb"
:methods-prefix "maec-"
:properties-prefix "paec-"
:constants-prefix "caec-"
)
-
Also using MEP 2008...
Command: (vlax-Import-Type-Library :tlb-filename "AecXBase.tlb":methods-prefix "maec-":properties-prefix "paec-":constants prefix "caec-")
T
I dunno... :|
-
Maybe this can be of some use:
http://www.theswamp.org/index.php?topic=9441.msg132792#msg132792
-
I guess I should add MEP SP1
Whats the date on your AecXBase.tlb file?
Mines 9/7/2007 9:17 AM
Also using MEP 2008...
Command: (vlax-Import-Type-Library :tlb-filename "AecXBase.tlb":methods-prefix "maec-":properties-prefix "paec-":constants prefix "caec-")
T
I dunno... :|
-
Load the Vlide and try again
It seems that this is what causes the problem on my end.
If I dont start the vlide it runs fine.
Also using MEP 2008...
Command: (vlax-Import-Type-Library :tlb-filename "AecXBase.tlb":methods-prefix "maec-":properties-prefix "paec-":constants prefix "caec-")
T
I dunno... :|
-
Yeah vlide and protected var assignment is flaky .. heck even the Autodesk expresstools in previous versions wouldn't load properly if the vlide was open.
-
Did you tried with this:
(pragma '((unprotect-assign paec-get-linewieght paec-put-lineweight)))
(vlax-Import-Type-Library
:tlb-filename "AecXBase.tlb"
:methods-prefix "maec-"
:properties-prefix "paec-"
:constants-prefix "caec-")
(pragma '((protect-assign paec-get-linewieght paec-put-lineweight)))
As in my previous post ?
-
At first no, but now I have and the result is the same error.
What is pragma? I cant find any documentation on this.
Did you tried with this:
(pragma '((unprotect-assign paec-get-linewieght paec-put-lineweight)))
(vlax-Import-Type-Library
:tlb-filename "AecXBase.tlb"
:methods-prefix "maec-"
:properties-prefix "paec-"
:constants-prefix "caec-")
(pragma '((protect-assign paec-get-linewieght paec-put-lineweight)))
As in my previous post ?
-
Its not even if the vlide is open. Its if the vlide HAS been OPENED.
Even if I close the vlide I get the error.
Yeah vlide and protected var assignment is flaky .. heck even the Autodesk expresstools in previous versions wouldn't load properly if the vlide was open.
-
I guess I should add MEP SP1
Whats the date on your AecXBase.tlb file?
Mines 9/7/2007 9:17 AM
Same! :|
-
Its not even if the vlide is open. Its if the vlide HAS been OPENED.
Even if I close the vlide I get the error.
Yeah vlide and protected var assignment is flaky .. heck even the Autodesk expresstools in previous versions wouldn't load properly if the vlide was open.
That is correct, because the error trap from the VLIDE stays resident even after the VLIDE is closed.
You can change the notification by selecting Tools-->Environment Options-->General Options [General Tab] (in the VLIDE)
There is an option for "SETQ to protected symbols" .. if you set it to transparent, the error notification goes away
-
Thanks for all the info!