M76 Posted February 4, 2010 Share Posted February 4, 2010 Hi I'm trying to run a location query from a lisp but it gives an error message: "Invalid data type, or data overflow: ENNAME" I'm quoting the relevant parts of the developer help, for those who doesn't have map3d: (ade_qrydefine joinop bggroups not_op condtype qrycond endgroups) Returns a condition ID or nil. joinop A joining operator: "and" or "or" or "" (none). If "" (none) is specified, the default joining operator is used (see ade_prefgetval). bggroups For grouping this condition with others in the query definition you are building. Use one or more open parentheses as needed, or "" (none). For example, "((". not_op The NOT operator, if needed: "not" or "" (none). condtype A condition type: "Location", "Property", "Data", or "SQL". qrycond A condition expression. Depends on the condition type. See Condition Expressions below. endgroups For grouping this condition with others in the query definition you are building. Use one or more close parentheses as needed, or "" (none). For example, "))". Location-Polyline-Fence ("polyline" "fence" ename) ename AutoCAD entity name, or a set of points, or "?". If "?", when the query executes, it prompts the user to click a set of points. And here is my code, I also tried it with points list, but the error message is the same. (setq lof (ssget "_X" (list (cons 0 "LWPOLYLINE") (cons 8 "_lay")))) (if lof (progn (setq hlof (sslength lof)) (setq i 0) (while (< i hlof) (setq enname (ssname lof i)) ;(make-vert-list enname) (ade_qryclear) (ade_qrysettype "draw") (ade_qrydefine '("" "" "" "Location" ("polyline" "fence" enname) "")) (tpm_qrysettoponame "foldreszlet") (tpm_qrysetrestopo (strcat "valogat_" (itoa i)) ) (ade_qryexecute) (setq i (1+ i)) ) ) ) Quote Link to comment Share on other sites More sharing options...
M76 Posted February 4, 2010 Author Share Posted February 4, 2010 Ok, I'm stupid, I used quote instead of list Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.