Error malformed list on input

I'm having an error thrown on me in the first line of a new program I'm trying to write. I've read that you want to localize your variables in parentheses after the c:name. But when I put the values in there it flags an error on me saying malformed list on input. Here is what it looks like:   (defun...

Visual LISP, AutoLISP and General Customization


Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.


Showing results for 


Search instead for 

Did you mean: 


  • Back to forum


  • Previous

  • Next

cncah

18541 Views, 19 Replies

‎01-25-2014

12:39 PM

Malformed list on input


I’m having an error thrown on me in the first line of a new program I’m trying to write. I’ve read that you want to localize your variables in parentheses after the c:name. But when I put the values in there it flags an error on me saying malformed list on input. Here is what it looks like:

(defun c:f2scfrt ( / *error* osm ipt1 ipt2 midX midY angent lftwall)

I’ve tried lowercase, uppercase doesn’t seem to matter. If I take out all that and just leave ( / ). Then the program loads and I can start trying to debug the program. I’m new to autolisp and am trying to learn the best I can. I’m currently trying to use the tutorial on error handling from Lee Mac’s website. Very nice website, trying to learn the best I can from examples he uses. Is there a good book that someone could suggest that would be pretty much like: AutoLISP For Dummies? I’ve tried looking at the autodesk reference guide, but it is pretty vague and doesn’t go into any detail on the individual subjects. I’m picking up some good basics from AfraLISP and the JeffreyPSanders websites as well. I’m just basically needing to know if I can leave the defun line in my program ( / ) or if I need to figure out a way to add my setq values in there to localize them. Any help is appreciated. Thanks.


  • Back to forum


  • Previous

  • Next

19 REPLIES 19

hmsilva

‎01-25-2014

01:44 PM

The «malformed list on input» usually means unbalanced brakets, therefore nothing to do with localize variables.

Post your code, will be easier to assist.

Al the sites mentioned by you, are very good places to learn, but don’t forget the AutoLISP Reference, the AutoLISP Devoloper’s Guide and the AutoLISP Tutorial from the Help files.

Henrique

Lee_Mac

stevor

‎01-25-2014

03:24 PM

Yah, me too. In addition to the parens, you also can have unbalanced » marks, that can cause several error. And 2 single ‘ marks do not make a «. Sometimes doing a setwise search thru the » characters is required. For the parens, there are free text editors that will illuminate the matching paren of a selected paren. Notepad2.exe is one of them.

S

cncah

‎01-25-2014

08:04 PM

Here is a simple program (well simple for others I guess) that I’m trying to write just to get some basics down. It’s for importing toolpath geometry from other dwg files. What I’m wanting to do, is insert commonly used blocks from other parts so that programming the 1000’s of parts for our cnc router will go a little faster. I’m currently having to navigate through the insert block window, and ever since I found out about AutoLISP, I want to try and automate or cut out the repetition as much as humanly possible. Our company puts out thousands upon thousands of different parts, just for the router, that have to be programmed by myself, and then if there is a revision made, I’m reprogramming those parts all over again. So the more automated I can get, the happier I’ll be. What I’m trying to do with this program is just have the user enter yes or no if they want to insert a certain block into the drawing. Thanks for the tip about double clicking after a parentheses and seeing where the expression starts and stops. I have been using vlide from a dummy drawing to go into the editor and write and de-bug the lisp programs. The parentheses checking is very helpful. So far I’ve gotten the program to run to the end it seems, but instead of finishing gracefully it gives me this error at the end:

;error: AutoCAD variable setting rejected: «Osmode» nil

I tried using the error handling tutorial from Lee Mac’s website so that if someone else at the company was trying to use the software and my program, they wouldn’t lose their osnap settings if they hit esc. I guess I still don’t have some things quite right in here. I appreciate the reference guides everyone suggested. I’ll be sure to check those out ASAP. Thanks for all the help. It’s greatly appreciated.

P.S. How do I place a prompt comment in the program, so that when I have this tweaked out and in the StartUp-Suite, I open up a drawing, and it displays <Type «cmb» To Start Block Insert Program> ?

Lee_Mac

‎01-26-2014

02:39 AM

A few things I notice immediately:

You store the value of the osmode system variable using the variable ‘oldosm’, but in the *error* function, you use a variable ‘osm’:

(defun *error* ( msg )
    (if osm (setvar 'osmode osm))
    ...
)
...
(setq oldosm (getvar "Osmode"))

You have an extra closing parenthesis which ends the function definition (defun) immediately after storing & setting the system variable values:

    ) ;End of storing old user settings

Lee_Mac

‎01-26-2014

03:07 AM

This should get you going in the right direction:

(defun c:cmb ( / *error* cmd ins osm )

    ;; Define local error handler to reset CMDECHO & OSMODE
    (defun *error* ( msg )
        (if cmd (setvar 'cmdecho cmd))
        (if osm (setvar 'osmode  osm))
        (if (not (member msg '("Function cancelled" "quit / exit abort")))
            (princ (strcat "nError: " msg))
        )
        (princ)
    )
    
    ;; Store current values of OSMODE & CMDECHO system variables
    (setq osm (getvar 'osmode)
          cmd (getvar 'cmdecho)
    ) ;; end setq
    
    ;; Set the sys vars to their required values
    (setvar 'osmode  3)
    (setvar 'cmdecho 0)

    ;; Initialise keyword options
    (initget "Yes No")
    ;; Prompt user
    (if (= "Yes" (getkword "nInsert Pkt_Radius_0.3583RH? [Yes/No] <No>: "))
        ;; Prompt user for insertion point
        (if (setq ins (getpoint "nPick insertion point: "))
            (command
                "_.-insert"
;| *=explode |; "*PktRadius3583RH" ;; Program assumes this block exists
                "_S" 1.0 ;; Block Scale = 1
                "_R" 0.0 ;; Block Rotation = 0
                "_non" ;; Ignore Object Snap for the next input
                ins
            ) ;; end command
        ) ;; end if
    ) ;; end if

    ;; Initialise keyword options
    (initget "Yes No")
    ;; Prompt user
    (if (= "Yes" (getkword "nInsert Pkt_Radius_0.3583LH? [Yes/No] <No>: "))
        (if (setq ins (getpoint "nPick insertion point: "))
            (command
                "_.-insert"
;| *=explode |; "*PktRadius3583LH" ;; Program assumes this block exists
                "_S" 1.0 ;; Block Scale = 1
                "_R" 0.0 ;; Block Rotation = 0
                "_non" ;; Ignore Object Snap for the next input
                ins
            ) ;; end command
        ) ;; end if
    ) ;; end if

    ;; Reset sys vars
    (setvar 'cmdecho cmd)
    (setvar 'osmode  osm)
    (princ "nEnd of program.")
    (princ) ;; Supress the return of the last evaluated expression
) ;; end defun
(princ "n<Type "cmb" To Start Block Insert Program>") ;; Loading expression
(princ) ;; Supress the return of the last evaluated expression on load

Note that for the sake of simplicity for your understanding, the above program does not test whether the blocks exist.

Lee

hmsilva

‎01-26-2014

05:01 AM

Lee Mac wrote:

«…for the sake of simplicity for your understanding…»

Nicely explained, Lee! Smiley Happy <Kudos>

Cheers

Henrique

cncah

‎01-26-2014

08:25 AM

Lee,

      Thank you very much for the fix to the program, I had noticed I had changed the osm variable in the program after I had uploaded it to the site, that’s my bad. I appreciate you showing me how to use the if function properly. I didn’t have the program structured correctly at all by the looks of it. I had seen the trick of using the * in front of the filename to explode it upon insertion before in my research, and have tried it many times, but can never get it to work. Doesn’t seem to matter if I describe the full path to the file, or if I move the files to the active document and just call out the filename without inputting the path info. Also, thanks for the tip of using _non to tell it to ignore the snap settings for insertion. I think that may be causing myself an issue on another program I’ve been trying to mess with that’s a bit more compilicated. I had to move the scale factor and the input for the rotation angle to individual inputs after the _S and _R commands. Was making the program throw an error saying invalid input having it like this in the program «_S» 1.0. This is what I ended up with and it runs great:

(defun c:cmb ( / *error* cmd ins osm )

    ;; Define local error handler to reset CMDECHO & OSMODE
    (defun *error* ( msg )
        (if cmd (setvar ‘cmdecho cmd))
        (if osm (setvar ‘osmode  osm))
        (if (not (member msg ‘(«Function cancelled» «quit / exit abort»)))
            (princ (strcat «nError: » msg))
        )
        (princ)
    )

       ;; Store current values of OSMODE & CMDECHO system variables
    (setq osm (getvar ‘osmode)
          cmd (getvar ‘cmdecho)
    ) ;; end setq

       ;; Set the sys vars to their required values
    (setvar ‘osmode  3)
    (setvar ‘cmdecho 0)

;Start Of Block Insertion Program—————————————————

;Pkt_Radius_0.3583RH—————————————————————-

    (initget «Yes No»)
    (if (= «Yes» (getkword «nInsert Pkt_Radius_0.3583RH? [Yes/No] <No>: «))
        (if (setq ins (getpoint «nPick insertion point: «))
          (progn
            (command
                «_.-insert»
                «PktRadius3583RH»
                «_S»
                «1.0» ;; Block Scale = 1
                 «_R»
                «0.0» ;; Block Rotation = 0
                «_non» ;;Ignore osnaps for block insertion
                ins
                ) ;; end command
            (command «_explode»
                             «last») ;;Explode last inserted block
     )
        ) ;; end if
    ) ;; end if

;Pkt_Radius_0.3583LH—————————————————————-

     (initget «Yes No»)
    (if (= «Yes» (getkword «nInsert Pkt_Radius_0.3583LH? [Yes/No] <No>: «))
        (if (setq ins (getpoint «nPick insertion point: «))
          (progn
            (command
                «_.-insert»
                «PktRadius3583LH»
                «_S»
                «1.0» ;; Block Scale = 1
                «_R»
                «0.0» ;; Block Rotation = 0
                «_non» ;;Turn osnaps off for block insertion
                ins
                ) ;; end command
          (command «_explode»
                           «last») ;;Explode last inserted block
     )
        ) ;; end if
    ) ;; end if

;End Of Block Insertion————————————————————-

    ;; Reset sys vars
    (setvar ‘cmdecho cmd)
    (setvar ‘osmode  osm)
    (princ «nEnd of program.»)
    (princ) ;; Supress the return of the last evaluated expression
) ;; end defun
(princ «n<Type «cmb» To Start Block Insert Program…>») ;; Loading expression
(princ) ;; Suppress the return of the last evaluated expression on load

I appreciate the help with the training and getting me out of the rut I was in. As always Lee you have helped me out tremendously and I thank you. I’m going to start adding all the other blocks that I need to this program and will refer to it as my template when writing new programs. Thank You Very Much!!!

Lee_Mac

‎01-26-2014

08:25 AM

Thank you Henrique!

The program could be enhanced further, but I didn’t want to deviate too far from the original code so as not to overwhelm the OP. Smiley Happy

Lee

Lee_Mac

‎01-26-2014

08:41 AM


@cncah wrote:
Thank you very much for the fix to the program


 You’re welcome! Smiley Happy


@cncah wrote:

I had seen the trick of using the * in front of the filename to explode it upon insertion before in my research, and have tried it many times, but can never get it to work. Doesn’t seem to matter if I describe the full path to the file, or if I move the files to the active document and just call out the filename without inputting the path info.


The use of the asterisk only works when supplying only the block name to the -INSERT command (i.e. when the block is either already defined in the drawing, or the drawing file for the block resides in an AutoCAD Support File Search Path).


@cncah wrote:

This is what I ended up with and it runs great:

(defun c:cmb ( / *error* cmd ins osm )

    …

)


Excellent — I’m glad you were able to get the program working as required.

A couple of minor suggestions:

1) You could combine the two command expressions into one, removing the need for progn:

          (progn
            (command
                "_.-insert"
                "PktRadius3583RH"
                "_S"
                "1.0" ;; Block Scale = 1
                 "_R"
                "0.0" ;; Block Rotation = 0
                "_non" ;;Ignore osnaps for block insertion
                ins
                ) ;; end command
            (command "_explode"
                             "last") ;;Explode last inserted block

  becomes:

(command
    "_.-insert"
    "PktRadius3583RH"
    "_S" "1.0"
    "_R" "0.0"
    "_non" ins
    "_.explode"
    "_last"
)

2) Instead of separately prompting the user for an insertion point, you could take advantage of the ghosting effect afforded by the -INSERT command, i.e. this:

    (initget "Yes No")
    (if (= "Yes" (getkword "nInsert Pkt_Radius_0.3583RH? [Yes/No] <No>: "))
        (if (setq ins (getpoint "nPick insertion point: "))
          (progn
            (command
                "_.-insert"
                "PktRadius3583RH"
                "_S"
                "1.0" ;; Block Scale = 1
                 "_R"
                "0.0" ;; Block Rotation = 0
                "_non" ;;Ignore osnaps for block insertion
                ins
                ) ;; end command
            (command "_explode"
                             "last") ;;Explode last inserted block
     )
        ) ;; end if
    ) ;; end if

Becomes:

(initget "Yes No")
(if (= "Yes" (getkword "nInsert Pkt_Radius_0.3583RH? [Yes/No] <No>: "))
    (if (vl-cmdf "_.-insert" "PktRadius3583RH" "_S" "1" "_R" "0" "\")
        (command "_.explode" "_last")
    )
) 

@cncah wrote:

I appreciate the help with the training and getting me out of the rut I was in. As always Lee you have helped me out tremendously and I thank you. I’m going to start adding all the other blocks that I need to this program and will refer to it as my template when writing new programs. Thank You Very Much!!!


Thank you for your gratitude for my time & assistance — you are most welcome.

cncah

‎01-27-2014

04:47 AM

Ok Lee, I’ve got a new one for you. A lot of the blocks I need to insert are the same size and dimensions, the only difference is the thickness assigned to that particular entity. But, for the router software, the layer name has to have that thickness at the end of the layer name. Example being, several of the blocks are named Pkt_Radius_0.0000. The thickness is the difference in each instance. Some of the blocks I insert on a regular basis are Pkt_Radius_0.3583, Pkt_Radius_0.4110, Pkt_Radius_0.5410. I tried to modify the program to insert a block that has no thickness, and the layer name is Pkt_Radius_. Then I would prompt the user to input the thickness desired as a negative number. (It has to be a negative number.) Then when I do a _.chprop command the setq variable I assigned to the thickness gets put into that command to change the thickness. But after that I would like to convert that number to a positive number, and add it to the end of the layer name. So that Pkt_Radius_ would become Pkt_Radius_0.3583. I used abs to convert the negative to a positive number and setq that to a new variable name, then when I try using append or cons to add the two variables together to get a new layer name, it keeps throwing an error on me. Some research I did showed having to get the layer table, and converting the entity to a vla-object and all that to get the layer name for that entity I’m modifying. But it seems to me like I wouldn’t have to go through all that if I know what the previous layer name was already. I appreciate any help. This is the code I have most recently, and it still doesn’t work:

(setq en1 (entlast)) ;;Sets the last inserted entity as the one being changed

(setq thk (getreal «nEnter Thickness For Inserted Block Example -0.7500: «))

(setq thk1 (abs thk)) ;;Changes the negative thickness number to a positive and sets it a new variable

(setq oldlayername ‘(Pkt_Radius_)) ;;Assigns the inserted block’s layer name to a variable

(setq newlayername (strcat (oldlayername thk1))) ;;I’ve tried using append and cons here as well. Just can’t get it structured correctly I guess.

(command «_chprop»

                     en1

                     «» ;;Selects the inserted entity for properties change

                     «Thickness»

                     thk ;;Inputs the thickness value | THIS SHOULD ALWAYS BE A NEGATIVE NUMBER!|

                     «»

                     ) ;;End thickness change to new entity

            (command «_Rename»

                              «Layer»

                             oldlayername

                             «»

                             newlayername

                             «»

                              ) ;;End of layer rename

             ) ;; End of function commands

        ) ;; end if

    ) ;; end if

I also have a trim option I would like to use after each block insert, I tried writing it as a separate program and just calling it from the main program like this:

                                                     (command «_optrim»

                                                      )

But it throws an error on me when trying to do that. I’d like to keep the program length down if possible. I’ve seen examples of people running one program inside another but they always just show that one little section of it. I don’t know what it is supposed to look like for my particular program where if someone chooses to insert a block afterwards it would prompt the user if they need to trim the entity. Thanks in advance. I’ll include my latest version of the program from earlier as well.

Kent1Cooper

‎01-27-2014

05:00 AM


@cncah wrote:

(setq oldlayername ‘(Pkt_Radius_)) ;;Assigns the inserted block’s layer name to a variable

(setq newlayername (strcat (oldlayername thk1))) ….


Layer names are text strings, and that’s what (strcat) will want to work with.  Try changing the first line above to:

(setq oldlayername «Pkt_Radius_»)

Kent Cooper, AIA

cncah

‎01-27-2014

10:30 AM

Ok, I got it to set the Pkt_Radius_ to the oldlayername value. But I still can’t get the Pkt_Radius_ and a real number(0.3583) to add together. I got it to add together at one point, but it left a space in between the 2 values:

Pkt_Radius_ 0.3583

I appreciate some help with this as I’m starting a new batch of parts I have to program and I’d like to start using this lisp at full capacity soon. Thank You.

I guess, I just need to know how to add a set of text to a real number so I can set that to a new value and use that to rename the layer.

Kent1Cooper

‎01-27-2014

11:11 AM


@cncah wrote:

Ok, I got it to set the Pkt_Radius_ to the oldlayername value. But I still can’t get the Pkt_Radius_ and a real number(0.3583) to add together. ….

I guess, I just need to know how to add a set of text to a real number so I can set that to a new value and use that to rename the layer.


I hadn’t looked closely enough to notice that what you were tacking on was a number.  In that case:

  (setq newlayername (strcat (oldlayername (rtos thk1 2 4))))

The 2 is for decimal mode.  The 4 is the number of decimal places, which will flesh it out with trailing zeros when appropriate, as in some of your examples.

Kent Cooper, AIA

cncah

‎01-27-2014

11:29 AM

I had already tried the rtos conversion, but then it gives an error on the Pkt_Radius_ portion saying:

bad function: Pkt_Radius_

That was using this code:

(setq thk (getreal «nEnter Thickness For Inserted Block Example -0.7500: «))    ;;I type in=     -0.3583 and press enter
     (setq thk1 (abs thk)) ;;Changes the negative thickness number to a positive
     (setq oldlayername ‘(Pkt_Radius_))
     (setq newlayername (strcat (oldlayername (rtos thk1 2 4))))

Then when using this code I get:

bad function: «Pkt_Radius_»

(setq thk (getreal «nEnter Thickness For Inserted Block Example -0.7500: «))    ;;I type in=     -0.3583 and press enter
     (setq thk1 (abs thk)) ;;Changes the negative thickness number to a positive
     (setq oldlayername «Pkt_Radius_»)
     (setq newlayername (strcat (oldlayername (rtos thk1 2 4))))

I’ll keep playing with it to see if I can get any different outcomes. I gratefully appreciate any help.

Kent1Cooper

‎01-27-2014

11:55 AM

I didn’t notice the extra left parenthesis you had in there, preceding the oldlayername variable name [and corresponding extra right parenthesis at the end].  Try this:

(setq newlayername (strcat oldlayername (rtos thk1 2 4)));; no ( before oldlayername

Kent Cooper, AIA

cncah

‎01-27-2014

01:41 PM

That fixed the layername setq. Although when I check the value in vlide, it shows up in quotation marks.

«Pkt_Radius_0.3583»

So when I go to rename the layer it throws me an error saying:  Invalid layer name

I’ve tried doing it through _chprop, and -rename, and _change commands. All of them seem to not like the new layer name I’m trying to change in there. This is what I’m running right now:

(setq en1 (entlast)) ;;Sets the last inserted entity as the one being changed

(setq thk (getreal «nEnter Thickness For Inserted Block Example -0.7500: «))

(setq thk1 (abs thk)) ;;Changes the negative thickness number to a positive

(setq oldlayername «Pkt_Radius_»)

(setq newlayername (strcat oldlayername (rtos thk1 2 4)))

     (command «_chprop»

                       en1

                       «» ;;Selects the inserted entity for properties change

                       «Thickness»

                       thk ;;Inputs the thickness value | THIS SHOULD ALWAYS BE A NEGATIVE NUMBER!|  

                       «»

                        ) ;;End of thickness change to new entity

     (command «-Rename»  

                       «Layer»

                        oldlayername

                        «» ;;Inputs what the old layer name was

                        newlayername

                        «» ;;Inputs what the new layer name will be

                         ) ;;End of layer rename

I’ve tried changing the layer name change command a few different ways, this method seems to get me the closest. When I manually change the layer name at the command line the only method that works is the -rename command. Both the _chprop and _change commands flag the error: invalid layer name. I appreciate all the help Kent, it’s been very beneficial.

Kent1Cooper

‎01-27-2014

01:58 PM


@cncah wrote:

….Although when I check the value in vlide, it shows up in quotation marks.

«Pkt_Radius_0.3583»

….

     (command «-Rename»  

                       «Layer»

                        oldlayername

                        «» ;;Inputs what the old layer name was

                        newlayername

                        «» ;;Inputs what the new layer name will be

                         ) ;;End of layer rename

….


Yes, Layer names are text strings, and those always display with double-quotes at the ends.

The Layer names, both old and new, will be «registered» by the end of their text strings, and don’t need an additional Enter for that.  Try removing the orange lines, which I believe you do not need.

Kent Cooper, AIA

cncah

‎01-27-2014

02:02 PM

That did it Kent. You are the man! Thank you so very much!Smiley LOL


  • Back to forum


  • Previous

  • Next

Содержание

  1. AutoCAD Electrical
  2. Issue:
  3. Causes:
  4. Solution:
  5. Thread: AutoCAD menu utilities loaded. ERROR: malformed list on input
  6. AutoCAD menu utilities loaded. ERROR: malformed list on input
  7. Re: AutoCAD menu utilities loaded. ERROR: malformed list on input
  8. Re: AutoCAD menu utilities loaded. ERROR: malformed list on input
  9. Re: AutoCAD menu utilities loaded. ERROR: malformed list on input
  10. Re: AutoCAD menu utilities loaded. ERROR: malformed list on input
  11. Re: AutoCAD menu utilities loaded. ERROR: malformed list on input
  12. Re: AutoCAD menu utilities loaded. ERROR: malformed list on input
  13. AutoCAD Electrical
  14. Проблема
  15. Причины:
  16. Решение

AutoCAD Electrical

By:

Issue:

You receive the one of the following error messages in AutoCAD Electrical:

Error: malformed string on input

Error: malformed list on input

Error: ADS request error

Error: No function definition: WD_ARX_FORMAT_PATH

The AutoCAD Electrical right-click (marking) menu does not work for components in your drawings. Other AutoCAD Electrical functions may fail, as well. The UNDOCTL variable may be set to a value of 48, or other combination less than 53 (which is the default), which leads regular UNDO functions to fail.

Causes:

The Lastproj.fil file has been corrupted. This is usually caused by the presence of a single (non-paired) double quotation symbol ( » ) in the Project Descriptions of a project which is loaded into AutoCAD Electrical.

  • One of your custom AutoLISP routines has been corrupted. The AutoLISP File may be corrupted or have mismatched parentheses pairs (for example, in an (if), (progn), or (defun) statement in the program structure). To determine if this is the case, use the VisualLISP Editor.
  • The AutoCAD Electrical Environment file (WD.ENV) may contain a mismatched parentheses pair or a single (non-paired) double quotation symbol.
  • There is a problem finding/loading the Access Database Engine, which can lead to the program not starting at all, or to the Electrical functions not working.

Solution:

Removing double quotation symbols from any project descriptions should resolve the issue. Follow these steps for all projects which are loaded in the Project Manager:

  1. Right-click a project name in the Project Manager.
  2. From the right-click menu, select ‘Descriptions. ‘
  3. In the Project Description dialog, locate and delete any double quotation symbols («). If the symbol is there to represent a value in inches, replace the » symbol with -INCH (or some equivalent verbiage). Alternately, adding another double quotation symbol to the same Description field can correct the issue.
  4. Click OK to apply the changes and exit the dialog.

This change should repair the lastproj.fil file, and correct the undesirable behaviors.

However, in some instances, deleting the LastProj.fil file is also necessary. Follow these steps:

  1. Close AutoCAD Electrical.
  2. Using Windows Explorer, browse to the path C:Users AppDataRoamingAutodeskAutoCAD Electrical 20xxRxx.xenuSupportUser *
  3. Delete the lastproj.fil file.
  4. Restart AutoCAD Electrical and open a project.

*The Xs represent values which vary between the AutoCAD Electrical releases.

For instances where the error is caused by custom LISP routines, they will need to be debugged/corrected to avoid the issue.

For the issuing being caused by the WD.ENV file, it is only necessary to examine those lines in the file which do not begin with an asterisk (*) character. If an unmatched parenthesis or double quotation symbol is encountered, either pair it with another (as appropriate) or delete the offending single character.

For the scenario where the Access Database Engine cannot be loaded, please see this article that covers that topic.

Источник

Thread Tools
Display

Hello All,
I just noticed this error message after I start a new drawing and when I open an old drawing.

AutoCAD Express Tools Copyright © 2002-2004 Autodesk, Inc.

AutoCAD menu utilities loaded.E R R O R: malformed list on input

I noticed in my search for «malformed list» that this is a parentheses problem.
Does this error mean that the problem is in express tools? I am assuming that when the error message refers to «menu utilities loaded» it means express tools. Do I need to look through all the .lsp in express tools?

Any help will be appreciated.

thanks,
Tom Goodman
Wilson, NC

It is probably not your Express Tools. Do you have any other routine loading during opening of AutoCAD or a drawing?

Did you or someone else load a lisp routine in your «start-up suite» lately?
If you or they did, the error is probably in that routine.
To check. type «appload» and look into the «start-up suite» and see if there’s anything there.
That’s where most people place lisp routines they want loaded in every drawing.

There are other ways to automatically load routines though, but your IT guy would have probably done it.

Hi Ted,
Well, you caught me. I did look at a .lsp file that I thought was messing up and did some searching about malformed lists and tried to find the problem with VLIDE and probably misplaced a few parentheses. But the file still works. I got a copy of the file from a coworker and copied it over the suspect one. Could you look at the file or tell me how to find mismatched parentheses?

Hi Opie,
We do have an old ACAD.lsp that we still use in the start up.

Hi Ted,
Well, you caught me. I did look at a .lsp file that I thought was messing up and did some searching about malformed lists and tried to find the problem with VLIDE and probably misplaced a few parentheses. But the file still works. I got a copy of the file from a coworker and copied it over the suspect one. Could you look at the file or tell me how to find mismatched parentheses?

Using the VLIDE you can use the Parenthesis Matching tool found under the Edit menu.

You can also use the keyboard shortcuts to find them. The shortcuts are listed in the menu.

Using the VLIDE you can use the Parenthesis Matching tool found under the Edit menu.

You can also use the keyboard shortcuts to find them. The shortcuts are listed in the menu.

Источник

AutoCAD Electrical

Автор:

Проблема

В AutoCAD Electrical появляется одно из следующих сообщений об ошибке:

Ошибка: неверно сформированная строка на входе

Ошибка: неверно сформированный список на входе

Ошибка: ошибка запроса ADS

Ошибка: Нет определения функции: WD_ARX_FORMAT_PATH

Контекстное меню AutoCAD Electrical (отслеживающее) не работает для компонентов в чертежах. Другие функции AutoCAD Electrical также могут вызывать сбой. Для переменной UNDOCTL можно задать значение 48 или другое сочетание меньше 53 (по умолчанию), что приводит к сбою в работе обычных функций UNDO.

Причины:

Файл Lastproj.fil поврежден. Обычно это происходит из-за наличия одиночного (не парного) символа двойной кавычки ( » ) в описаниях проекта, загруженного в AutoCAD Electrical.

  • Одна из пользовательских процедур AutoLISP повреждена. Файл AutoLISP может быть поврежден или иметь несоответствующие пары скобок (например, в операторе (if), (progn) или (defun) в структуре программы). Чтобы определить, так ли это, используйте редактор VisualLISP.
  • Файл среды AutoCAD Electrical (WD.ENV) может содержать несоответствующую пару скобок или одиночный (непарный) символ двойной кавычки.
  • Возникла проблема при поиске/загрузке ядра СУБД Access, которая может привести к тому, что программа не запустится совсем, или к тому, что функции Electrical не будут работать.

Решение

Удаление символов двойных кавычек из описаний проекта должно устранить проблему. Выполните следующие действия для всех проектов, загруженных в Диспетчер проектов.

  1. Щелкните правой кнопкой мыши имя проекта в Диспетчере проектов.
  2. В контекстном меню выберите «Описания. «
  3. В диалоговом окне Описание проекта найдите и удалите все двойные кавычки («). Если обозначение используется для представления значения в дюймах, замените символ » на -INCH (или какой-либо эквивалентный текст). Кроме того, проблему можно устранить, добавив в то же поле «Описание» еще один символ двойной кавычки.
  4. Нажмите кнопку «ОК», чтобы применить изменения и закрыть диалоговое окно.

Это изменение должно исправить файл lastproj.fil и исправить нежелательное поведение.

Однако в некоторых случаях также требуется удалить файл LastProj.fil. Выполните следующие действия.

  1. Закройте AutoCAD Electrical.
  2. С помощью Проводника Windows перейдите к папке C:Users AppDataRoamingAutodeskAutoCAD Electrical 20xxRxx.xenuSupportUser.
  3. Удалите файл lastproj.fil.
  4. Перезапустите AutoCAD Electrical и откройте проект.

* Значения X отличаются в версиях AutoCAD Electrical.

В случаях, когда ошибка вызвана пользовательскими процедурами LISP, их необходимо отладить или исправить, чтобы избежать этой проблемы.

В случае возникновения проблем в файле WD.ENV необходимо только проверить строки в файле, которые не начинаются со звездочки (*). Если обнаруживаются непарные скобки или двойные кавычки, либо заключите их в пары с другими символами (если необходимо), либо удалите один символ, который вызывает ошибку.

Подробные сведения о сценарии, в котором компонент Access Database Engine не может быть загружен, приведены в этой статье.

Источник

  1. 2007-03-08, 03:54 PM


    #1

    Default AutoCAD menu utilities loaded. ERROR: malformed list on input

    Hello All,
    I just noticed this error message after I start a new drawing and when I open an old drawing.

    Regenerating model.

    AutoCAD Express Tools Copyright © 2002-2004 Autodesk, Inc.

    AutoCAD menu utilities loaded.E R R O R: malformed list on input

    I noticed in my search for «malformed list» that this is a parentheses problem.
    Does this error mean that the problem is in express tools? I am assuming that when the error message refers to «menu utilities loaded» it means express tools. Do I need to look through all the .lsp in express tools?

    Any help will be appreciated.

    thanks,
    Tom Goodman
    Wilson, NC


  2. 2007-03-08, 04:03 PM


    #2

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    It is probably not your Express Tools. Do you have any other routine loading during opening of AutoCAD or a drawing?

    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.

    jUSt


  3. 2007-03-08, 04:29 PM


    #3

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Did you or someone else load a lisp routine in your «start-up suite» lately?
    If you or they did, the error is probably in that routine.
    To check. type «appload» and look into the «start-up suite» and see if there’s anything there.
    That’s where most people place lisp routines they want loaded in every drawing.

    There are other ways to automatically load routines though, but your IT guy would have probably done it.

    Just a thought.


  4. 2007-03-08, 04:58 PM


    #4

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Hi Ted,
    Well, you caught me. I did look at a .lsp file that I thought was messing up and did some searching about malformed lists and tried to find the problem with VLIDE and probably misplaced a few parentheses. But the file still works. I got a copy of the file from a coworker and copied it over the suspect one. Could you look at the file or tell me how to find mismatched parentheses?

    thanks, Tom


  5. 2007-03-08, 05:02 PM


    #5

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Hi Opie,
    We do have an old ACAD.lsp that we still use in the start up.


  6. 2007-03-08, 05:13 PM


    #6

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Quote Originally Posted by tom.g

    Hi Ted,
    Well, you caught me. I did look at a .lsp file that I thought was messing up and did some searching about malformed lists and tried to find the problem with VLIDE and probably misplaced a few parentheses. But the file still works. I got a copy of the file from a coworker and copied it over the suspect one. Could you look at the file or tell me how to find mismatched parentheses?

    thanks, Tom

    Using the VLIDE you can use the Parenthesis Matching tool found under the Edit menu.

    You can also use the keyboard shortcuts to find them. The shortcuts are listed in the menu.

    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.

    jUSt


  7. 2007-03-08, 06:14 PM


    #7

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Quote Originally Posted by Opie

    Using the VLIDE you can use the Parenthesis Matching tool found under the Edit menu.

    You can also use the keyboard shortcuts to find them. The shortcuts are listed in the menu.

    Yea, what OPIE said. I don’t use visual lisp much (VLIDE) but that would be a good thing to start with. I don’t have any training in VLIDE, I’ve dabbled in it though.
    AutoCAD has an old routine called PQCHECK.lsp which checks lisp programs for mismatched parentheses and closing quotes. While in autocad, you load it, and to run it, the command is «pqcheck» and then you need to type the path of the routine you want to check ( ie: c:lispsample.lsp) and it will tell you where your problem is.

    If you have an ACAD.lsp you may have some routines automaically loading through that.


  8. 2007-03-08, 09:14 PM


    #8

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Quote Originally Posted by tedg

    . . .an old routine called PQCHECK.lsp . . .

    Copyright (C) 1992 by Autodesk, Inc.
    Time to take a step forward ?
    15 years later. . .VLIDE can do a LOT more than that.

    : ) Happy Computing !

    kennet


  9. 2007-03-08, 09:29 PM


    #9

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Hi,
    Yeah, I remember, barely, using it years ago. It’s a little touchy.
    Do you, or anyone, know if there is a white paper or an ATP class on VLIDE?

    THANKS


  10. 2007-03-08, 09:32 PM


    #10

    Default Re: AutoCAD menu utilities loaded. ERROR: malformed list on input

    Quote Originally Posted by tom.g

    Hi,
    Yeah, I remember, barely, using it years ago. It’s a little touchy.
    Do you, or anyone, know if there is a white paper or an ATP class on VLIDE?

    THANKS

    I think one of the last Autolisp ATP courses had some information on it. I know it was not the last one though. You will probably have to wait another month or so till it is available.

    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.

    jUSt


malformed list error on startup — which lisp?

Discussion in ‘AutoCAD’ started by Simon Wegner, Oct 20, 2004.

  1. I just did some tweaking on a bunch of my lisp routines -slow day yesterday- including a number in my startup suite. Now I notice that I’m getting the «error — malformed list on input» message at startup. Without testing each routine individually, is there a simple way to find out which LISP has the error?
    Thanks in advance,

    Simon

    1. Advertisements

  2. I HATE it when that happens! :)

    Bad thing is that there may be more than just one thing wrong — and you’ve
    only gotten to the first one… :[email protected]

    Good thing is that it is usually something simple like a missing » or ).

    Basically, you’ve got to have a feel for what your routine load sequence is.

    The combinations are nearly endless, but if you’ve done any file organizing,
    you may have a file dedicated to that purpose. Or…
    You may have an acad.lsp file that does that.
    You may have an acaddoc.lsp file that does that.
    You may have some other .lsp file that does that.
    You may have an .mnl file that does that.
    Your startup suite may also be an indicator.

    If you know what has been already been loaded — perhaps a princ statement at
    the end of one file may print to the command line: ‘Big Bunch of Dimension
    Routines Loaded.’
    By noting your command line messages (if you have any), you may be able to
    fairly easily find the offending routine by deduction. (Because File X was
    ‘next in line’ and IT didn’t get loaded, see?)

    If you don’t have such messages in your routines, consider putting them in
    there.

    You also may be able to deduce what didn’t get loaded by custom functions
    (from different files) that work and functions that don’t. The ones that
    don’t belong to a file that didn’t make it, so check that file.

    Time to play detective. :)

    hth,
    David Kozina

    1. Advertisements

  3. «Malformed list» *usually* means one or more missing «)» characters. If you
    have too many «)» or too few «(» you’ll normally get an «Extra right paren»
    error; and a missing double quote («) will result in one of several «string»
    or «dotted pair» errors.

    If your LISP routines are in separate files, try loading each one manually
    until the error occurs, then …

    start by matching the «(» and «)» characters in the code you tweaked.
    ___

    yesterday- including a number in my startup suite. Now I notice that I’m
    getting the «error — malformed list on input» message at startup. Without
    testing each routine individually, is there a simple way to find out which
    LISP has the error?

  4. What I’ll do sometimes is to place a sequence of load time prompts or alerts
    before each defun such as…

    (prompt «n0»)
    (defun …

    (prompt «n1»)
    (defun …

    This will then show you where in the lisp file the error is occuring.

    You can delete or comment out the prompts afterward.

    Visual Lisp has some good debugging features that you could use as well.

    Don

  5. I don’t use the startup suite to load lisps. I prefer using a series of
    autoload statements in a lisp that’s part of the startup sequence, e.g.
    acaddoc.lsp or an mnl file. This way there’s no delay on opening a drawing
    while lisps are loaded. This isn’t a huge deal with today’s fast computers,
    but I still think it’s better practice to not load a file until it’s
    actually needed, as per the autolaod mechanism.

    A side effect of this would be that the error message wouldn’t appear until
    the bad lisp is called, so you would immediately know where the problem
    lies.

  6. Yeah, that’s what I ought to do but haven’t. The whole lisp thing is fairly new for me and I’m constantly creating new or editing old routines. I’ve been keeping most of my routines as individual files so no one screw up -something pretty frequent given my inexperience- doesn’t kill everything. My computer’s fast enough that this doesn’t slow it down noticeably. I suppose my first move should be to compile it all with markers embedded.

    I ended up finding the problem routine — a simple parens issue- by reloading until I got the error again as Paul suggested. I guessed lucky and got it on the second try.

    Thanks to everyone. Now, off to create more problems….

    Simon

  7. Perhaps you aren’t familiar with autoloading lisp files. It’s an easy way to
    prevent this kind of problem. It will also make it far easier to copy your
    setup to another computer or share it within your office. I’d suggest
    looking up autoload in help.

    1. Advertisements

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.


CAD Forums

Страницы 1 2 Далее

Чтобы отправить ответ, вы должны войти или зарегистрироваться

RSS

Сообщения с 1 по 25 из 31

#1 1 декабря 2003г. 16:04:55

  • Oleg
  • Восстановленный участник
  • На форуме с 21 июня 2002г.
  • Сообщений: 50
  • Спасибо: 0

Тема: Как развернуть много объектов каждый относительно своей оси?

Как развернуть много объектов каждый относительно своей оси???

#2 Ответ от Сергей Попадьин 1 декабря 2003г. 16:39:46

  • Сергей Попадьин
  • Восстановленный участник
  • На форуме с 5 февраля 2003г.
  • Сообщений: 311
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

а что считать

и как ее определить для объекта?

#3 Ответ от Oleg 1 декабря 2003г. 19:51:33

  • Oleg
  • Восстановленный участник
  • На форуме с 21 июня 2002г.
  • Сообщений: 50
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

Ну допостим центр объекта…!
Предположим много надписей, необходимо развернуть, но без смещения!

#4 Ответ от Vova 2 декабря 2003г. 04:23:05

  • Vova
  • Активный участник
  • На форуме с 12 июля 2002г.
  • Сообщений: 636
  • Спасибо: 9

Re: Как развернуть много объектов каждый относительно своей оси?

Попробуй это: *^C^C_Rotate;\;90  Если угол 90 не нравится, поставь свой. Работает так: макаешь мышку в кнопку с этим макросом, помечаешь первый овъект ДВУМЯ кликами или рамкой и третий клик в точке вращения. Об-ект развернется и тут же можешь разворачивать следующий объект, и так далее пока не нажмешь Esc или другую команду.

#5 Ответ от Сергей Попадьин 2 декабря 2003г. 09:59:31

  • Сергей Попадьин
  • Восстановленный участник
  • На форуме с 5 февраля 2003г.
  • Сообщений: 311
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

Для задания оси требуется, на сколько я помню, две точки, а центр объекта (даже если предположить что ВСЕГДА известно что это такое) — только одна. Написать программу на Лиспе можно минут за 5-10 если сперва все же четко сформулировать задачу

#6 Ответ от VH  2 декабря 2003г. 12:14:22

  • VH 
  • Активный участник
  • На форуме с 14 июня 2001г.
  • Сообщений: 1,381
  • Спасибо: 7

Re: Как развернуть много объектов каждый относительно своей оси?

Если полагать (как это делает команда _ROTATE), что «ось вращения» параллельна оси Z, то достаточно и одной точки.

#7 Ответ от Эдуард Смолянка 2 декабря 2003г. 13:30:21

  • Эдуард Смолянка
  • Восстановленный участник
  • На форуме с 23 апреля 2003г.
  • Сообщений: 795
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> VH
Точно.
а центр объекта можно достать обработав результат функции
vla-getboundingbox

#8 Ответ от Сергей Попадьин 2 декабря 2003г. 17:54:57

  • Сергей Попадьин
  • Восстановленный участник
  • На форуме с 5 февраля 2003г.
  • Сообщений: 311
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> Эдуард
>  VH
Протестую!!! Это все допущения!!! :))
Я просто пытаюсь выудить из человека нормальную постановку задачи, а не пойди туда — не знаю куда…
Кстати, а какую ось Z надо иметь в виду — МСК, ПСК или ОСК???

#9 Ответ от Эдуард Смолянка 2 декабря 2003г. 18:12:56

  • Эдуард Смолянка
  • Восстановленный участник
  • На форуме с 23 апреля 2003г.
  • Сообщений: 795
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> Сергей Попадьин
Да это понятно.
Но вроде и так уже сообразили в чем дело

(defun C:povorot()
  (setvar "cmdecho" 0)
  (setvar "osmode" 0)
  (vl-load-com)
  (initget 1)
  (setq up (getreal "n rotation angle:")
    )
  (if
  (setq naborobj (ssget)
    )
  (progn
    (setq n 0)
    (repeat (sslength naborobj)
      (setq vlaobj
         (vlax-ename->vla-object
           (ssname  naborobj n)
           )
        )
       (vla-getboundingbox  vlaobj 'p1 'p2)
      (setq minpt (vlax-safearray->list p1)
        )
      (setq maxpt(vlax-safearray->list p2)
        )
      (setq sentpt (mapcar '(lambda (x)
                  (* x 0.5)
                  )
               (mapcar '+ minpt maxpt)
               )
        )
      (command "rotate"
           (vlax-vla-object->ename vlaobj) "" sentpt up)
      (setq n (1+ n)
        )
      );repeat
    )
  )
  (princ)
  )
        

#10 Ответ от VH  2 декабря 2003г. 18:23:12

  • VH 
  • Активный участник
  • На форуме с 14 июня 2001г.
  • Сообщений: 1,381
  • Спасибо: 7

Re: Как развернуть много объектов каждый относительно своей оси?

Предположим много надписей, необходимо развернуть, но без смещения!

Надписи, то есть TEXT и MTEXT, имеют угол поворота строки, который и следует изменить (например через Окно Свойств): выбрать все «надписи», которые должны иметь одинаковый угол поворота строки, и в Окне Свойств ввести значение угла.

#11 Ответ от Эдуард Смолянка 2 декабря 2003г. 23:29:25

  • Эдуард Смолянка
  • Восстановленный участник
  • На форуме с 23 апреля 2003г.
  • Сообщений: 795
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> VH
Это все хорошо Владимир , но Вы прикинте что в этом случае базовая точка поворота
идет относительно точки вставки текста.(в моей функции  относительно центра объекта.)
С текстом проще- координаты можно найти функцией
texbox.
Однако задача все-таки правильно не поставлена — в
этом согласен с Сергеем Попадьиным.
То-что мы помогаем это все домыслы.
Однако увидев сообщение Олега от 19.51 считаю , что понял его мысль.

#12 Ответ от Oleg 3 декабря 2003г. 00:16:39

  • Oleg
  • Восстановленный участник
  • На форуме с 21 июня 2002г.
  • Сообщений: 50
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

Не получается запустить ваш Lsp …
error: malformed list on input

#13 Ответ от Oleg 3 декабря 2003г. 00:21:55

  • Oleg
  • Восстановленный участник
  • На форуме с 21 июня 2002г.
  • Сообщений: 50
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

sorry…  к Эдуарду msg

#14 Ответ от VH  3 декабря 2003г. 07:47:30

  • VH 
  • Активный участник
  • На форуме с 14 июня 2001г.
  • Сообщений: 1,381
  • Спасибо: 7

Re: Как развернуть много объектов каждый относительно своей оси?

> Эдуард
Надеюсь, что у Владимира в самом деле все хорошо.

…Сеня, расскажи товарищу, только быстро, зачем Вовка усы сбрил…

#15 Ответ от Эдуард Смолянка 3 декабря 2003г. 09:10:17

  • Эдуард Смолянка
  • Восстановленный участник
  • На форуме с 23 апреля 2003г.
  • Сообщений: 795
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> Oleg
Не хватает скобки,скорее всего пропустили последнюю.

#16 Ответ от Эдуард Смолянка 3 декабря 2003г. 10:05:43

  • Эдуард Смолянка
  • Восстановленный участник
  • На форуме с 23 апреля 2003г.
  • Сообщений: 795
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> VH
Sorry спутал с VK — ники похожие

#17 Ответ от Сергей Попадьин 3 декабря 2003г. 10:25:39

  • Сергей Попадьин
  • Восстановленный участник
  • На форуме с 5 февраля 2003г.
  • Сообщений: 311
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

Я не спорю — догадаться что человек хочет конечно можно в конце-концов, но что мешает четко сформулировать задачу (не только к Олегу относится) ??? Если Вы обратили внимание, я регулярно обращаю на этот факт внимание задающих вопросы… правда пока без особого успеха, как и в этом случае (VH и Эдуард отдуваются за Олега, а он молчит как партизан…)
Четко заданный вопрос экономит не только время (всех участников), но и сетевой трафик…

#18 Ответ от ABoltrushko 3 декабря 2003г. 11:24:27

  • ABoltrushko
  • Восстановленный участник
  • На форуме с 26 февраля 2003г.
  • Сообщений: 366
  • Спасибо: 1

Re: Как развернуть много объектов каждый относительно своей оси?

А если так…

;Изменить угол поворота (текста,блока)
(DEFUN C:ENT_ROTATE ()
  (SETQ a (SSGET))
  (SETQ b (SSLENGTH a))
  (SETQ r (GETREAL "nНовый угол поворота: "))
  (SETQ r (* pi (/ r 180.0)) )
  (WHILE (> b 0)
    (SETQ b (1- b))
    (SETQ d (SSNAME a b))
    (SETQ d (ENTGET d))
    (SETQ old_r (ASSOC 50 d))
    (SETQ new_r (CONS 50 r))
    (SETQ d (SUBST new_r old_r d))
    (ENTMOD d)
  )
  (PRIN1)
)

#19 Ответ от VH  3 декабря 2003г. 12:44:27

  • VH 
  • Активный участник
  • На форуме с 14 июня 2001г.
  • Сообщений: 1,381
  • Спасибо: 7

Re: Как развернуть много объектов каждый относительно своей оси?

У операции «поворот» есть два варианта:
1) поворот до определенного положения: после операции все объекты «смотрят» в одном направлении
2) поворот на определенный угол: после операции «взаимное положение» объектов сохраняется.
Зачеркнуть ненужное…

#20 Ответ от Сергей Попадьин 3 декабря 2003г. 14:22:50

  • Сергей Попадьин
  • Восстановленный участник
  • На форуме с 5 февраля 2003г.
  • Сообщений: 311
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

Предлагаю ВСЕМ подождать, когда Олег все же решит что ЕМУ необходимо…

#21 Ответ от Oleg 3 декабря 2003г. 16:20:19

  • Oleg
  • Восстановленный участник
  • На форуме с 21 июня 2002г.
  • Сообщений: 50
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> ABoltrushko
Ваш lisp работает, только когда задаешь новый угол — ни чего не происходит? Может что не так делаю…?

> Эдуард
А ваш lisp так и не получилось запустить… все скобки вроде на месте… — error: malformed list on input
У меня 2002 acad  Англ версия.

#22 Ответ от Эдуард Смолянка 3 декабря 2003г. 16:46:54

  • Эдуард Смолянка
  • Восстановленный участник
  • На форуме с 23 апреля 2003г.
  • Сообщений: 795
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> Oleg
error: malformed list on input-сообщение возникает при
недостаточном количестве закрывающих скобок.
Возможно они затесались в комментарий когда Вы
переносили лисп в файл.
Отправляю файл на мыло.

#23 Ответ от Oleg 3 декабря 2003г. 18:08:52

  • Oleg
  • Восстановленный участник
  • На форуме с 21 июня 2002г.
  • Сообщений: 50
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> Эдуард
Спасибо все работает…  Но!
Объекты вращаются вокрук центра глобальной системы координат…
Я так понимаю что эту задачу не автоматизировать…
Вообще в автокаде у объектов есть своя система координат? (как в максе)?

#24 Ответ от VH  3 декабря 2003г. 18:14:16

  • VH 
  • Активный участник
  • На форуме с 14 июня 2001г.
  • Сообщений: 1,381
  • Спасибо: 7

Re: Как развернуть много объектов каждый относительно своей оси?

Я так понимаю что эту задачу не автоматизировать…

>Эдуард Страна смотрит на Вас — сделайте как в MAXе.

#25 Ответ от Эдуард Смолянка 3 декабря 2003г. 18:56:40

  • Эдуард Смолянка
  • Восстановленный участник
  • На форуме с 23 апреля 2003г.
  • Сообщений: 795
  • Спасибо: 0

Re: Как развернуть много объектов каждый относительно своей оси?

> VH
Вот-так! Самый умный из нас Сергей Попадьин!

Страницы 1 2 Далее

Чтобы отправить ответ, вы должны войти или зарегистрироваться

Are you still updating your AutoLisp Routines in Notepad? If so, you know why people say LISP stands for, ‘Lost In Stupid Parentheses’ because it can be a pain trying to make sure everything is matched up properly. What if I told you there is a LISP Editor inside AutoCAD that is fairly easy to use and has some basic functions that allow you to automate testing processes and debug mistakes…. all in an editor that is COLOR CODED!?

What VLISP Offers

During the development cycle of an AutoLISP application or routine, the AutoLISP user performs a number of operations that are not available within the AutoCAD software. Some of these operations—like text editing—are available with other software tools. Others, such as full AutoLISP source-level debugging, are introduced only with VLISP.

In VLISP, you perform most of the necessary operations inside a single environment. This permits text editing, program debugging, and interaction with AutoCAD and other applications. There are several components to the Visual Lisp Editor but I just want to introduce the basics of using it to look at a routine to show you how much easier it is to see how a routine looks in the VLISP (or VLIDE) command in AutoCAD.

Using Visual LISP documentation

The Visual LISP Developer’s Guide explains how to use the VLISP IDE and how to build and run AutoLISP applications. This guide also introduces the constructs of the AutoLISP language.

Starting Visual LISP

  1. Start AutoCAD.
  2. In the Tools menu select AutoLISP and then select Visual LISP Editor, or from the command prompt type: VLIDE or VLISP [Enter].
    • If it is the first time being loaded in the drawing session the Trace window may appear with info about current Visual LISP release and any errors that might be encountered when loading Visual LISP.
    • The Visual LISP window has four areas; Menu, Toolbars, Console window, and Status bar.
      •  Menu: The top of the Visual LISP window, will display the menu items, also the function of the menu item is displayed in the status bar.
      • Toolbars: Visual LISP has five toolbars; Debug, Edit, Find, Inspect, and Run. Depending on the window that is active, the display of the toolbars changes.
      • Console window: The Visual LISP Console window is contained inside the Visual LISP window. The window can be used to enter AutoLISP or Visual LISP commands. For example if you want to add two numbers, enter   (+ 2 9.5) next to the $ sign and then press the [Enter] key. Visual LISP will return & display the results in the same window.
      • Status bar: The bottom of the Visual LISP window, will display related information on menu items or a toolbar.

Using Visual LISP Text Editor To Check An Existing Routine

  1. Select Open File from the File menu. The Open File to edit/view dialog will display.
  2. Navigate to that file location, select the file and click the open button at the bottom of the dialog.
  3. The Visual LISP Text Editor window is displayed with the routine inside of it (A sample TRI.LSP is shown in the example below).
    • Note: if you would like to see how this works when creating a new routine then do a File New and type in the follow in the dialog below.
    • Watch the editor as you type in a Close Parentheses on how it will automatically show you where its matching Open Parentheses is by flashing to that location.
    • Afterwards you can save the lisp routine by clicking the disk icon and giving it a name if you would like.

Color Coding

Visual LISP Text Editor provides color coding for files that are recognized by Visual LISP. Some of the files that it recognizes are LISP, DCL, SQL, and C language source files. When you enter text in the editor; Visual LISP automatically determines the color and assigns it to the text. The following table shows the default color scheme:

Visual LISP Text Element Color                                                     

Parentheses: Red Built-in functions: Blue Protected symbols: Blue ; Comments: Magenta w/ gray background Strings: Magenta Real numbers: Teal Integers: Green Unrecognized items: Black (like user variables)

Other Helpful Hints On Matching Parentheses

While in the Text Editor, pressing the CTRL + [ (open bracket) looks for the matching open parentheses, and pressing the CTRL + ] (close bracket) looks for the matching close parentheses. This will help you match up your parentheses while creating lisp routines in the Visual Lisp Text Editor. This will also allow you to use a basic editor to visually see your lisp (and other programming) files in an easy to read display.

For example, if I accidentally added something like an extra ( “ )Quotation mark somewhere in the file it would appear like this in Notepad vs the VLISP editor:

You can see how much easier it is to find the mistake by the color coding.

Loading the Routine From The Editor:

The next great thing you can do in the editor is load the full (or just a highlighted section) straight into AutoCAD without needing to do an APPLOAD or some other means of loading the routine to test. Just pick the appropriate button on the menu.

Note if you get an error message…

What the Error Prompts Mean:

  • ; error: misplaced dot on input: need zero in front of decimals; i.e. (+ 1 .25 )
  • ; error: malformed string on input: missing matching quotes; i.e. (command “line)
  • ; error: malformed list on input: does not make a list, i.e. adding a number to nothing (+ 2 ), or parentheses not matching to close the list function (setq a (list a b).
  • ; error: extra right paren on input: too many close parentheses; i.e. (setq a))
  • ; error: too few arguments: not enough info or incorrect ; i.e. (SETQ A 2 3)
  • ; error: bad syntax: improper format of function; i.e. (DEFUN C: BOX) “should not have space between c: and box.”
  • ; error: bad argument type:numberp :nil or improper value of a symbol or format of function; i.e. (use !name to find nil symbol).

There are others that may appear, but these are the main ones that usually happen. We hope this helps in viewing and understanding your LISP files a lot better.

Applied Technology Group is a Platinum Autodesk Business Partner. Founded in North Little Rock, Ark., in 1992 as a local computer services company, ATG has grown to become a leading design technology partner with the purpose of assisting customers in maximizing the value and adoption of advanced technologies so they can perform competitively in the AEC sector. ATG collaborates with customers across the Gulf South, Midwest and Southwest through partnerships with 3DR, Autodesk, Leica, Microsoft and Panzura.

Autodesk and the Autodesk logo are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries.

Понравилась статья? Поделить с друзьями:
  • Error makefile 71 command syntax error
  • Error make sure you have a working qt qmake on your path
  • Error major abi change detected please run upgrade instead
  • Error main must return int как исправить
  • Error main method not found in class main please define the main method as