Hi, Pat Murnen!
It was exactly this what I needed.
Again, thank you very much.
LTriska
"Pat Murnen" escreveu na mensagem
news:6017069@discussion.autodesk.com...
You need to modify the function so it doesn't include the Catalog and Mfg
fields.
Some comments at the top of the .lsp file indicate the order of the data.
; Each sublist within wd_rdata list of lists:
; nth 0=ITEM
; nth 1=QTY
; nth 2=SUBQTY
; nth 3=CAT
; nth 4=MFG
; nth 5=
; nth 6=
; nth 7=CAT DESC
; nth 8=QUERY2
; nth 9=QUERY3
; nth 10=MISC1
; nth 11=MISC2
; nth 12=USER1
; nth 13=USER2
; nth 14=USER3
Here is some of the code in the function I added.
(foreach ii (list 4 3 7 8 9 10 11 12 13 14)
(setq val (nth ii lst))
(if (AND val (/= val ""))
(progn
; blank this value out
(setq lst (wd_nth_subst ii "" lst))
; add to running string
(if (/= str "")
(setq str (strcat str "," val)) ; 2+ so add comma
(setq str val) ; first one
)
) )
)
The list where I have the numbers, i.e. (list 4 3 7 8 9 10 11 12 13 14),
those are all the possible fields the might go into making up the
concatenated description. You need to take out any of the fields that you do
not want. So if you do not want Catalog and Manufacturer as part of this big
decription then edit the .lsp file and take out the 3 & 4. (use something
like NotePad) So the result would look like this -
(foreach ii (list 7 8 9 10 11 12 13 14)
(setq val (nth ii lst))
(if (AND val (/= val ""))
(progn
; blank this value out
(setq lst (wd_nth_subst ii "" lst))
; add to running string
(if (/= str "")
(setq str (strcat str "," val)) ; 2+ so add comma
(setq str val) ; first one
)
) )
)
If you didn't want to include MISC1 & MISC2 then you would take out 10 & 11.
You can also change the order of the data in your concatenated line by
changing the order of the numbers in that list. Say you wanted the order
USER1, USER2, USER3, CAT DESC. Then the list would look like (list 12 13 14
7)
Hope this helps,
Pat Murnen
wrote in message news:6017048@discussion.autodesk.com...
Hi!
The LSP routine worked but the fields CATALOG and MFG were for the column
DESCRIPTION, see the attached.
How could I solve this?
Thanks.
LTriska