- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey there,
This is the kind of thing that happens when you let an Inventor piping designer play with AutoLisp. LOL
Would one of you who knows what they are doing please take a look at this (admittedly very crude) code, and help me see where the "too many arguments" is coming from? For background, what I am attempting to do here, is have a dialog with several pull down lists, and have the code concatenate a string from the selections and place it on the drawing. The dialog box is working fine, the lists are there, and... before I started adding the "strcat" section, I was able to run it and manually return the correct values from the selections using (print "setq"). So, I'm fairly certain I am capturing the variable. I just don't seem to know how to tell it what to do with them once I have them. Any help, and advice (so I learn how to do it right) would be greatly appreciated.
Thanks in Advance.
(defun C:ltag () (setq PSIZE '("1/4" "1/2" "3/4" "1" "1 1/2" "2" "3" "4" "6" "8" "10" "12" "14" "16" "18" "20" "24")) (setq PMAT '("PVC" "CPVC" "CSBW" "CSSC" "316BW" "310BW" "304BW" "TIBW" "TISC" "GALV" "PVDFSW" "PVDFSC" "PTFE/DI" "ETFE/CS" "PVC/FRP" "CPVC/FRP" "FRP" "HDPESW" "316TC" "PVDFFS" "316S")) (setq dcl_id (load_dialog "linetag.dcl")) (if (not (new_dialog "linetag" dcl_id)) (exit)) (start_list "size") (mapcar 'add_list PSIZE) (end_list) (start_list "mat") (mapcar 'add_list PMAT) (end_list) (setq siz (get_tile "size")) (setq mat (get_tile "mat")) (action_tile "cancel" "(done_dialog) (setq userclick nil)") (action_tile "accept" "(strcat (siz mat))" "(done_dialog)(setq userclick T))") (start_dialog) (unload_dialog dcl_id) (princ) ) (princ)
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
Solved! Go to Solution.