@Sea-Haven/ all this works great. However, I have questions and complications.
It tells me to close any excel I have open. Does this mean of that file?
Can we make it ask me for a file name / location? Not a huge deal, just thinking of the "next" project.
It does not pick up the TAG and I do not now what the Handle is.
It adds the data in rows.
Bname | TAG | Att Val | Handle |
HCN1_11P_3C0 | DESC1 | SAMPLE PLUG | 3.00E+08 |
HCN1_11P_3C0 | DESC2 | | 3.00E+08 |
HCN1_11P_3C0 | DESC3 | | 3.00E+08 |
HCN1_11P_3C0 | INST | | 3.00E+08 |
HCN1_11P_3C0 | LOC | | 3.00E+08 |
HCN1_11P_3C0 | TERM01P | 1 | 3.00E+08 |
HCN1_11P_3C0 | TERM02P | 2 | 3.00E+08 |
HCN1_11P_3C0 | TERM03P | 3 | 3.00E+08 |
HCN1_11P_3C0 | TERMDESC01P | + test | 3.00E+08 |
HCN1_11P_3C0 | TERMDESC02P | test | 3.00E+08 |
HCN1_11P_3C0 | TERMDESC03P | SIGNAL test | 3.00E+08 |
This is what I would ideally like it to look like. Note I removed the P/J suffix from the terms and termdesc as it will be either one.
TAG1 | TAG2 | DESC1 | DESC2 | DESC3 | INST | LOC | TERM01 | TERMDESC01 | TERM02 | TERMDESC02 | TERM03 | TERMDESC03 |
P??1 | | SAMPLE PLUG | | | | | 1 | + test | 2 | test | 3 | SIGNAL test |
P??3 | | | | | | | 1 | | 2 | | 3 | |
Can we pivot this so that there is a single row with the headers as TAG* (could be TAG1 (parent) or TAG2 (child), DESC1, DESC2, DESC3, INST, LOC, ... this way, each connector takes a single row. Don't really need the block name as the tag tells me what which one it is. However, the block name tells it is a connection. I change to this....
(setq blklist (list
"*CN*"
)); setq/list
to pick up verticals and horizontals and it worked fine.
Now the complication......
The TERMDESCXXP - P = PLUG. it is a J for Jacks. I tried adding a * in the list but that did not work. This is also true for the TERMXXP.
The sample has 3 terms but this varies from 1 term to, so far, 81 terms but this could conceivably be hundreds I guess.
I am trying to understand as much of this as I can. I commented out this
;; Now, reverse the list
;; (setq bnlist (reverse bnlist))
because it reversed the order. When the data goes left to right, it may be different.
Also, I have to "load" the app for it to run. I only want it to run when I type in the command. To do this do I add...
(defun C:exportcons (
rest of code here
)
?
Thanks so much for all y'alls help!! I love this forum!
Steven