Search the Community
Showing results for tags 'autolisp'.
-
Hi.. as I told before, I am a beginner in LISP, trying to write something, but getting error.. "error: malformed list on input" . what it means? I have list :- ((((1 . x ) (2 . y)) ((3 . z) (4 . a))) (((1 . m ) (2 . n)) ((3 . o) (4 . p))))) I want this as :- (((x y) (z a)) ((m n) (o p))) (defun test1 () (setq gb '((((1 . x ) (2 . y)) ((3 . z) (4 . a))) (((1 . m ) (2 . n)) ((3 . o) (4 . p))))) (setq blanka '()) (setq blankb '()) (setq len1 (length gb)) (setq count1 0) (while ( (setq data1 (nth count1 gb)) (setq len2 (length data1) (setq count2 0) (while ( (setq data2 (nth count2 data1)) (setq blankb (append blankb (list data2))) (setq count2 (1+ count2)) ) ; while (setq blanka (append blanka (list data1))) (setq count1 (1+ count2)) ) ;while )
-
How to define a function in AutoLISP with arbitrary arguments
Ahankhah posted a topic in AutoLISP, Visual LISP & DCL
Hello everyone, does anyone knows a way to define a function in AutoLISP with arbitrary arguments, same as ARX? -
Hi all New to this forum and am in search of help. I have been lumbered with a project to take ACAD drawings of a control system into ACAD Electrical. The old version has no use of layers and has text for the wire numbers. What I would like to do is change the text lines to a wire layer thus giving me use of the auto numbering. Additionally I note that the export to spreadsheet does not take all of the attributes of the components i.e. a relay contact shows, when editing the properties, the wire number at each connection but is not in the spread sheet. This woudl be great if it could report this to produce the wiring schedule automatically. So to sum it up is tere anyway to get a lisp progran to change the text object and can it also extract the data I need for the wiring schedule into any form of text file. Cheers Phil
-
Hi I am making a lisp routine that inserts a block and breaks the line the block is inserted in. The block inserted is a pump schematic which includes the valves, strainer and control points (tags). I use the BREAKDIM attribute (invisible) to set the width of the linebreak that the block is inserted into. (some of you old lispers would remember the code BBlock.lsp ) I am would like to burst the block after inserting it from within the lisp routine. If I use the code (C:burst) It invokes the burst command but prompts me to: select objects. I would like to have it burst the block that was just inserted (entlast) or let me input the block name. Another option would be to use the (command "._explode" "L" "") function and then erase the attribute Def -`BREAKDIM. To do this I would need some code to find an Attribute def (not in a block anymore as it was just exploded) with the TAG "BREAKDIM" and then use the `command "erase" function to delete it. If anyone can help it would be much appreciated. Mbuk
-
Hey all, I have a quick question. I apologize if this has already been asked, but I can not find it myself. I have searched other spots, but its hard if the thread does not specifically deal with your question. My problem is, we have a LISP routine at my company. After you get all of the information from the user, it will insert a block in a specific arrangement in a specific amount. Like, insert blah blah blah 3 times downward 1 inch apart. Everything works fine, but the problem is is that the block HAS to be in the drawing, otherwise the routine fails. If you run it while the block is IN the drawing, it runs fine, no problems. Help?! I have scoured different ways to have it insert the blocks, but no combination seems to work. Here is the line for inserting the block, any ideas? (command "insert" "terminal" (polar #pt1 1.570796327 0.125) "" "" "")
- 27 replies
-
- blocks wont insert
- autolisp
-
(and 1 more)
Tagged with: