add custom properties to properties dialog box?

add custom properties to properties dialog box?

zasanil
Advocate Advocate
1,013 Views
5 Replies
Message 1 of 6

add custom properties to properties dialog box?

zasanil
Advocate
Advocate

Hello,

Is there a way in the CUI (or other customization) to have user defined properties show up inside the properties dialog box?

An example I have in mind is when you have the properties box open and you have a few polylines selected which have different lengths, the length box shows up  with a value of *VARIES*. I was wondering if it would be possible to have a new box under that one with a value of the range (min/max) length somehow. Or 2 boxes, max length / min length.

Thanks

Dan Nicholson C.I.D.
PCB Design Engineer
0 Likes
Accepted solutions (3)
1,014 Views
5 Replies
Replies (5)
Message 2 of 6

ВeekeeCZ
Consultant
Consultant
Accepted solution

No, but you can have these informations on status bar. See attachments for imagination...

Message 3 of 6

Kent1Cooper
Consultant
Consultant
Accepted solution

@zasanil wrote:

.... when you have the properties box open and you have a few polylines selected which have different lengths, the length box shows up  with a value of *VARIES*. I was wondering if it would be possible to have a new box under that one with a value of the range (min/max) length somehow. Or 2 boxes, max length / min length. ....


Would something you could call up instead of the Properties box do?  For lengths in particular, you could have a little command such as this [in rather simple terms, and lightly tested]:

 

(vl-load-com); if needed
(defun C:ROL (/ ss str ent etype); = Report Object Length(s)
  (if (not (setq ss (ssget "_I" '((0 . "*LINE,ARC,CIRCLE,ELLIPSE")))))
    (setq ss (ssget '((0 . "*LINE,ARC,CIRCLE,ELLIPSE"))))
  ); if
  (setq str "Object:   Length:")
  (repeat (setq n (sslength ss))
    (setq
      ent (ssname ss (setq n (1- n)))
      etype (cdr (assoc 0 (entget ent)))
    ); setq
    (if (not (wcmatch etype "MLINE,XLINE")); found by above but w/o reportable length
      (setq str
        (strcat
          str "\n" etype "       " ; [change number of spaces as desired]
          (rtos (vlax-curve-getDistAtParam ent (vlax-curve-getEndParam ent))); length
        ); strcat
      ); setq
    ); if
  ); repeat
  (alert str)
); defun

That puts up an Alert box listing all objects among the selection that it can report a length for, with each one's length [in current Units length format setting].  It works with or without pre-selection of objects.  As written, you would have to deduce the range of lengths yourself, but such a thing could be made to add the longest and shortest lengths to the reporting, or report only those and not the length of each object, or whatever other permutation you desire.  It could report more things about each object, and/or you could make separate but similar ones to report on different properties.  It could report to the Command: line with a Prompt, instead of in an Alert.  Etc., etc.

 

 

Kent Cooper, AIA
Message 4 of 6

zasanil
Advocate
Advocate

Thank you guys for the suggestions! was mostly interested about modifying the properties box but it doesn't sound like that is feasable. The example I gave was just one of a few that I was interested in, but I guess I'll have to explore the r options you mentioned.

Dan Nicholson C.I.D.
PCB Design Engineer
0 Likes
Message 5 of 6

Kent1Cooper
Consultant
Consultant
Accepted solution

@Kent1Cooper wrote:
....

 

....
  (setq str "Object:   Length:")
....
          str "\n" etype "       " ; [change number of spaces as desired]
....

.... 


It occurred to me that (alert) might accept \t Tab designators, and I find that it does.  If you replace the above with:

 

....
  (setq str "Object:\tLength:")
....
          str "\n" etype "\t"
....

then all the Length figures will be nicely lined up, regardless of the lengths of their entity type text parts, except those of LWPOLYLINEs, which get kicked over another Tab's worth [in my settings -- I don't know what determines the size of a Tab, and it may be affected by Windows settings for fonts used in these kinds of things].

Kent Cooper, AIA
Message 6 of 6

zasanil
Advocate
Advocate

That is goot to know about the tabs.

Thanks Kent!

Dan Nicholson C.I.D.
PCB Design Engineer
0 Likes