TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ronjonp on May 14, 2012, 12:09:21 PM

Title: ; error: too many arguments with mlinestyle dictionary
Post by: ronjonp on May 14, 2012, 12:09:21 PM
Has anyone else seen this error when browsing the enames of the styles (in red below) when using (dictsearch (namedobjdict) "ACAD_MLINESTYLE") ?

((-1 . <Entity name: 7efafef8>)
  (0 . "DICTIONARY")
  (5 . "5F")
  (102 . "{ACAD_REACTORS")
  (330 . <Entity name: 7efafc60>)
  (102 . "}")
  (330 . <Entity name: 7efafc60>)
  (100 . "AcDbDictionary")
  (280 . 0)
  (281 . 1)
  (3 . "Standard")
  (350 . <Entity name: 7efaff00>)
)
Title: Re: ; error: too many arguments with mlinestyle dictionary
Post by: irneb on May 14, 2012, 12:43:28 PM
Could you post some sample code which produces the error? How do you mean browsing the enames? Through entget? Or is it when you use dictnext/dictsearch?
Title: Re: ; error: too many arguments with mlinestyle dictionary
Post by: ronjonp on May 14, 2012, 12:55:11 PM
Could you post some sample code which produces the error? How do you mean browsing the enames? Through entget? Or is it when you use dictnext/dictsearch?

Sorry .. I was a bit vague.  :oops: I get the error accessing the items just about anyway (entget, dictsearch, just browsing in the vlide etc...)

Just this will create the error  (cdr (assoc 350 (dictsearch (namedobjdict) "ACAD_MLINESTYLE")))  :?

*Maybe it's an issue related to having both AutoCAD 2013 and 2009 installed on the same computer. Nope ... just tested on another computer.
Title: Re: ; error: too many arguments with mlinestyle dictionary
Post by: pBe on May 14, 2012, 01:22:44 PM
the only time it gives an error here is when
(entget (assoc 350  (dictsearch (namedobjdict) "ACAD_MLINESTYLE")))

typo eror on my part where i miss the call to cdr, but i guess that would be too obvious  :-D
Title: Re: ; error: too many arguments with mlinestyle dictionary
Post by: VovKa on May 14, 2012, 01:44:09 PM
'Inspect' in vlide produces an error but entget works just fine
map 2005

edit
did you try vlax-ename->vla-object ?
Title: Re: ; error: too many arguments with mlinestyle dictionary
Post by: pBe on May 14, 2012, 02:00:55 PM
'Inspect' in vlide produces an error but entget works just fine
map 2005

That may very well be the case, so  its not  typo , its just plain ol' me being a  retard .  :laugh:

"me" as pBe that is
Title: Re: ; error: too many arguments with mlinestyle dictionary
Post by: ronjonp on May 14, 2012, 03:01:56 PM
'Inspect' in vlide produces an error but entget works just fine
map 2005

edit
did you try vlax-ename->vla-object ?

Interesting .. same thing here. Thanks for looking into it.
vlax-ename->vla-object works for me.