Lỗi select objects error bad argument type stringp nil năm 2024

Uploaded by

loopback127xyz

0% found this document useful (0 votes)

470 views

192 pages

The Visual LISP Editor

Copyright

© © All Rights Reserved

Available Formats

DOC, PDF, TXT or read online from Scribd

Share this document

Did you find this document useful?

Is this content inappropriate?

0% found this document useful (0 votes)

470 views192 pages

The Visual LISP Editor

Uploaded by

loopback127xyz

The Visual LISP Editor

i cant understand why some functions can ba used as an argument to princ function while others yell he error "error: bad argument type: stringp".

Your code is calling the alert function, not the princ function; however, the error is a result of passing a non-string argument to the strcat function, which, as , takes only string arguments.

Any of the prin* functions (princ / prin1 / print) can indeed be used to print data of any data type, e.g.:

(defun objreport ( / obj ) (if (setq obj (car (entsel))) (progn (setq obj (vlax-ename->vla-object obj)) (princ "\nThis a brief report about the selected object:\nColor: ") (princ (vla-get-color obj)) (princ "\nLineweight: ") (princ (vla-get-lineweight obj)) (princ "\nLayer: ") (princ (vla-get-layer obj)) ) ) (princ) )

See the section: '' to understand the differences between these functions.

The solution to this error will depend on what you were doing (or trying to do) when you saw the error:

1. Ensure that the Microsoft Visual C++ Runtimes are up to date on your system.

If you've verified that you have the latest Microsoft Visual C++ Runtimes but you're still seeing the error, move on to the next step.

2. Close CAD.

3. With CAD still closed, open your LandFX folder.

Locate and open a file named _install_.xml.

Your LandFX folder might be located on your computer, on an office server, or on a shared online folder. Not sure where it is? Ask your IT administrator or CAD manager.

4. The file will open in your default text application, such as Notepad.

Verify that the information in the file, including your office's Land F/X Support ID, is complete in the file.

5. If any information, such as your Support ID, is missing from the _install_.xml file, close the file and locate it in your LandFX folder. Change the file's name, giving it the name _install_.xmlOLD.

6. Locate a file named _install_.xml.bak. Change this file's name to _install_.xml (don't forget the underscores).

7. Open CAD. Can you access your Land F/X tools without errors? If so, you've resolved the issue.

Still getting the error? Move on to the next step.

8. Copy the following text, including the parentheses, and paste it into the Command line: (getenv "username")

Press Enter.

If you now see the text 'nil' in the Command line, complete the following steps to resolve the error:

8A. Follow our steps to uninstall CAD.

Follow steps 1 through 5 in the article linked above, including deleting all additional registries and files. Do not reinstall CAD quite yet – you'll do that after the next step.

8B. Follow our steps to uninstall the F/X Workstation component.

8C. Now reinstall your version of CAD.

If you're reinstalling AutoCAD (not F/X CAD), you'll need to reinstall the F/X Workstation component to be able to see your Land F/X menus. The F/X Workstation component is included in the F/X CAD installer, so F/X CAD users won't need to reinstall F/X Workstation at this point.

Check whether your plant layers are locked – especially if you received the error when attempting to use our Verify Labels tool.

Here's an example of several locked plant layers as shown in the Layers Properties Manager:

If your plant layers are locked, unlock them. For instructions, see our documentation section.

Once you've unlocked your plant layers (if applicable), run the Verify Labels tool. If it functions correctly, you've resolved the issue.

If you are able to use the software (ruling out the damaged XML file) and your plant labels are all unlocked (ruling out the locked layers issue), our Color Render tool may be causing the problem. Do you have Color Render turned on? Read on.

1. Our Color Render tool can also cause this error from time to time. Your next step should be to for now.

2. Now repeat the action that generated the error. You should be able to complete that step without seeing the error message.

This error can also occur as a result of clicking the OK button in the Colorization dialog box when no plant color symbols have been assigned. In this case, the drawing will still appear with 2D symbols instead of color symbols, but will be in Color Render mode and potentially cause this error. You should still perform the troubleshooting step of clicking Turn Off Color – even if the plan doesn't look colorized – which may very well resolve the issue.

You can turn Color Render back on when ready to present your design.

You saw this error because the block you tried to place is saved in the main Discipline Graphics folder (LandFX/Blocks/discipline_graphics) instead of one of its subfolders.

Move the block's source files to a subfolder within the folder discipline_graphics, such as user_defined. You should now be able to place the block without seeing the error.

If none of the other scenarios listed above apply, or if you've followed the solution steps and you're still seeing the error, you most likely have corruption in your drawing.

Follow our steps to clean your drawing and all Xrefs.

Open the clean file and attempt the same action that generated the error. If you're not getting the error, you've cleaned your drawing successfully and can keep working in the clean drawing.

Don't want to clean your drawing? You can try to replicate the error in a blank drawing. Take care to open the blank drawing based on either the acad.dwt (Imperial units) or acadiso.dwt (metric units) templates. Repeat the action that seemed to cause the error, such as placing a plant or generating a Reference Notes Schedule – whatever you tried to do when you saw the error. If you don't see the error in the blank drawing, you're likely facing drawing corruption in the original drawing where you saw the error, and will need to clean it anyway.

Chủ đề