Message 1 of 4
Concatenate Columns and Add custom header to Cable from/To Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am using AutoCAD Electrical, Windows 10.
I'm trying to customize a Report with a User Post File and I am using this link as a good resource.
https://autodesk.typepad.com/systemsdesign/2014/08/customize-a-report-with-a-user-post-file.html
However I am not getting the desired output.
I want to be able to combine LOC2 and PIN2. So that LOC2 holds the value and it will look like this.
"LCC L : 1X1"
Here is the code I wrote for it but it does not work once I select User Post on the bottom right and select third option.
(if (= user_3 "1")
(progn
(setq rtrn '()) ; Start a new blank list to add
(foreach data wd_rdata ; look at each line in the report
; pull out the 2 lines
(setq LOC2 (nth 4 data))
(setq PIN2 (nth 6 data))
; string them together adding the space if non-blank
(if (/= LOC2 "")
(if (/= PIN2 "") (setq LOC2 (strcat LOC2 "" PIN2)))
; else
(setq LOC2 PIN2)
)
; Plug this new value back in the LOC2 field using the supplied data
(setq data (wd_nth_subst 4 LOC2 data))
; Need to reverse the list since build it by adding on at the..
(setq rtrn (reverse rtrn))
)
)
)
Can someone help and guide me in the right direction. I also would like to make a custom header as well. I have attached the .lsp and .cdl files.