User Defined Attribute List

User Defined Attribute List

galashkina
Advisor Advisor
1,870 Views
11 Replies
Message 1 of 12

User Defined Attribute List

galashkina
Advisor
Advisor

I need to include in the "From / To" report the following attributes: CAT, RATING1, DESC1.

I've included these attributes in the "User Defined Attribute List".

I start "Reports".

In "Report Generator" dialog box pressed the button "Change Report Format".

In the box "Available fields" added DESC11 and DESC12.

Other attributes are absent.

What attributes I can include in "User Defined Attribute List " ?

0 Likes
Accepted solutions (2)
1,871 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable

@galashkina wrote:

I need to include in the "From / To" report the following attributes: CAT, RATING1, DESC1.

I've included these attributes in the "User Defined Attribute List".

I start "Reports".

In "Report Generator" dialog box pressed the button "Change Report Format".

In the box "Available fields" added DESC11 and DESC12.

Other attributes are absent.

What attributes I can include in "User Defined Attribute List " ?


The fields you need are already there, although it is easy to understand your confusion.  In the images below you can see where I have highlighted the fields you need to use.  Sorry it is two images, but this is one of those dialogs that won't resize.  (Boo!  Bad programming!)

 

Also, cables don't carry a Rating attribute.  Although, I don't know why not.  What information are you wanting to show with that?

 

FromToFields.PNG

 

FromToFields2.PNG

 

0 Likes
Message 3 of 12

rhesusminus
Mentor
Mentor
I believe he wants the CAT, RATING1 and DESC1 information from the components/ symbols that the connection goes from/to.

I'm pretty sure you have to do some programming (user post) to achieve this.

Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
Message 4 of 12

galashkina
Advisor
Advisor

In the report must be attributes CAT, RATING1, DESC1 for the component From and for the component To.
It should not be attributes of the cable.

0 Likes
Message 5 of 12

Anonymous
Not applicable

@galashkina wrote:

In the report must be attributes CAT, RATING1, DESC1 for the component From and for the component To.
It should not be attributes of the cable.


Ah. My mistake then.

 

0 Likes
Message 6 of 12

galashkina
Advisor
Advisor
The "User attributes" allows to add attributes to the reports.
0 Likes
Message 7 of 12

rhesusminus
Mentor
Mentor

The "user attributes" allows you to add custom attributes to the reports, not standard attributes.

So, I'm pretty sure you have to do some programming to achieve this.


Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
Message 8 of 12

galashkina
Advisor
Advisor

Attribute DESC1 can be added to the list of user attributes, but attribute RATING1 can not be added, although the attribute DESC1 more standard attribute.

The user needs to know what attributes can be added to the list of user attributes. He should not determine it experimentally.

Message 9 of 12

rhesusminus
Mentor
Mentor
Accepted solution

Can we just say that you shouldn't use any of the AutoCAD Electrical specified attributes into the user attributes ?

You'll find a full list of attributes that shouldn't be used HERE

 


Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
Message 10 of 12

galashkina
Advisor
Advisor

A great loss!
Too bad Smiley Sad

0 Likes
Message 11 of 12

galashkina
Advisor
Advisor
 
0 Likes
Message 12 of 12

s.wile
Advocate
Advocate
Accepted solution

This info can be pulled from the project's scratch database using the User Post option when reporting.

Here is a little bit about the process involved in modifying the User Post files

http://autodesk.typepad.com/systemsdesign/2014/08/customize-a-report-with-a-user-post-file.html

 

There are several examples of code in the API's help that do close to what you want.

Here is a bit of code I saved from Nate Holt's blog several years ago. It takes some doing getting it working but I have pulled all kinds of stuff from many of the tables in the scratch database using this code.

 

User wants to include the connected component descriptions in the Wire From/To report. Currently this is not an option. But we can fill in the gap with a "User Post" !

 Here is the main addition to the user-post utility wirefrm2.lsp:

      (if (= user_5 "1") ; pull in component DESC1-3 values

        (progn

          ; "nil"=get current proj mdb file name

          (if (setq scratch_fnam (c:wd_mdb_get_proj_scratch_dbnam nil))

            (progn ; have active project's scratch database filename.

              ; Now do a query on the COMP table to get a list of all

              ; component desc data

              (setq complst (wd_oledb_select scratch_fnam (strcat

                      "SELECT HDL,DWGIX,DESC1,DESC2,DESC3 FROM [COMP]"

                      " WHERE DWGIX <> ''")))

              (setq rtrn nil)

              (foreach xx wd_rdata

                ; process CMP1. Get its handle and DWGIX value

                (setq hdl (nth 39 xx))

                (setq dwgix (nth 41 xx))

                ; Now search for this component in the query data

                ; from the scratch database

                (setq hit nil)

                (foreach x complst

                  (if (AND (= hdl (car x))(= dwgix (cadr x)))

                    (setq hit x)

                ) )

                (if hit

                  (progn ; found match. Push three desc values into

                         ; fields normally reserved for "from"

                         ; component's panel XYZ coordinates

                         ; PNLX1, PNLY1, and PNLZ1

                    (setq xx (wd_nth_subst 52 (nth 2 hit) xx)) ; DESC1

                    (setq xx (wd_nth_subst 53 (nth 3 hit) xx)) ; DESC2

                    (setq xx (wd_nth_subst 54 (nth 4 hit) xx)) ; DESC3

                    (princ hit)

                ) )

                ; process CMP2. Get its handle and DWGIX value

                (setq hdl (nth 40 xx))

                (setq dwgix (nth 42 xx))

                ; Now search for this component in the query data

                ; from the scratch database

                (setq hit nil)

                (foreach x complst

                  (if (AND (= hdl (car x))(= dwgix (cadr x)))

                    (setq hit x)

                ) )

                (if hit

                  (progn ; found match. Push three desc values into

                         ; fields normally reserved for "to"

                         ; component's panel XYZ coordinates

                         ; PNLX2, PNLY2, and PNLZ2

                    (setq xx (wd_nth_subst 56 (nth 2 hit) xx)) ; DESC1

                    (setq xx (wd_nth_subst 57 (nth 3 hit) xx)) ; DESC2

                    (setq xx (wd_nth_subst 58 (nth 4 hit) xx)) ; DESC3

                ) )

               

                (setq rtrn (cons xx rtrn))

              )         

              (setq rtrn (reverse rtrn))

              (setq wd_rdata rtrn)

        ) ) )                     

      )     

The key thing above is the query of the COMP table (about eight lines down) to read in all component handles and drawing index numbers along with DESC1-3 values. These handle/drawing index numbers are then used to find the matching connected component in each line of the report. The corresponding DESC1-3 values are then substituted into rarely used fields in the report.

 

 ... and here is the addition to the dialog defintion support file wirefrm2.dcl shown in bold text below:

 :toggle{key="user1";

        label=/*wirefrm2_dcl_007*/"Substitute wire color/gauge label text for LAYER names";

        }

 :toggle{key="user2";

        label=/*wirefrm2_dcl_012*/"Report only selected INST values";

        }

 :toggle{key="user3";

        label=/*wirefrm2_dcl_009*/"Report only non-cable connections";

        }

 :toggle{key="user4";

        label=/*wirefrm2_dcl_013*/"Report only selected wire types";

        }

 :toggle{key="user5";

        label="Include component DESC1-3 desc (into PNLX1-2,PNLY1-2,PNLZ1-2 fields)";

        }

Stan Wile
http://myacade.blogspot.com/
IMAGINiT Technologies