Author Topic: Drawing Properties dialog  (Read 3649 times)

0 Members and 1 Guest are viewing this topic.

Birdy

  • Guest
Drawing Properties dialog
« on: June 29, 2005, 10:39:59 AM »
We are using (autocad 2004) drawing properties for
filling out titleblock info using rtext. For example rtext for Job Number in the titleblock is: $(GETPROP, SUBJECT)

I have:(Summary tab)
   Title field = Job Name
   Subject field = Job Number
   Author field = Contractor
   Keywords field = Architect

and on Custom tab:

Name:      Value:
date      (user enters date here)
Rev.1      (user enters date here)
Rev.2      (user enters date here)
Rev.3      (user enters date here)
Rev.4      (user enters date here)
Rev.5      (user enters date here)
drawn_by    (initials)
chkd_by      (initials)

This works quite well for us.

Here's the questions:
1. Is there a way to change the summary tab info, so that a user sees
"Job Name:" rather than "Title:" etc.

2. Is there a way to 'grey out' the "name" fields in the custom tab.
The way it stands now, if a user changes anything in the name fields, our rtext diesel string won't recognize it.

3. (Most importantly) Are there good reasons why I wouldn't wanna mess with this stuff?  These aren't vital changes I need to make, just small ones that will "enhance the user expreience".  In the end, I think these questions may be moot in a more current release (not sure) or maybe it'd be best to not use dwgprops but rather an custom app for titleblock info.

TIA for the help.

daron

  • Guest
Drawing Properties dialog
« Reply #1 on: June 29, 2005, 11:51:24 AM »
First thing that comes to mind is to edit the block at the drawing level for the first question. Then, reinsert the block where you need it, especially any templates you may have. #2, same as above, but make the name constant. That would make the attributes unchangeable. Not sure if that's advisable though.

Birdy

  • Guest
Drawing Properties dialog
« Reply #2 on: June 29, 2005, 12:25:51 PM »
thanks Daron, but what I'm looking for is a way (?) to change this:



to read: Job Name, Job Number, etc.
We use these fields to populate our titleblock.
Sorry if I'm not clear.  Been a rough week (already)

Birdy

  • Guest
Drawing Properties dialog
« Reply #3 on: June 29, 2005, 12:36:45 PM »
and also looking for a way to grey these out so they dont
get "inadvertantly" changed:



Thanks. !!

ronjonp

  • Needs a day job
  • Posts: 7529
Drawing Properties dialog
« Reply #4 on: June 29, 2005, 12:41:44 PM »
I've been using this lisp to fill out those fields:

Code: [Select]
(vla-put-title
    (vla-get-summaryinfo
        (vla-get-activedocument
            (vlax-get-acad-object)
        )
    )
  (strcat (getvar 'dwgprefix)(getvar 'dwgname))
)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Drawing Properties dialog
« Reply #5 on: June 29, 2005, 12:46:32 PM »
Just a bunch of stuff I have laying around, hope you can make sense of it. :)
Code: [Select]

;Document.SummaryInfo
(defun get-suminfo-obj ()
  (vla-get-SummaryInfo
(vla-get-ActiveDocument
 (vlax-get-acad-object)
 )
)
  )

(defun login-as-author ()
  (vlax-put-property
    (get-suminfo-obj)
    'Author
    (getvar 'loginname)
    )
  )


(setq lst (list "Author" "Comments" "Keywords" "LastSavedBy"
"RevisionNumber" "Subject" "Title")
 )
(foreach item lst
  (princ
(strcat "\n"item " == " (vlax-get-property s_obj item))
)
  )


Code: [Select]

(setq *acad* (vlax-get-acad-object))
(setq *doc* (vla-get-ActiveDocument *acad*))

(setq si (vlax-get-property *doc* 'SummaryInfo))

;(vlax-invoke-method obj method arg [arg...])

(vlax-invoke-method si 'RemoveCustomByIndex 0)

(vlax-invoke-method si 'AddCustomInfo 0 "this")

(vlax-invoke-method si 'AddCustomInfo "mark" "that")

(vl-catch-all-apply
  'vlax-invoke-method (list si 'GetCustomByKey "section" 'k1)
  )

(vl-catch-all-apply
  'vlax-invoke-method (list si 'GetCustomByIndex 0 'v1 'k1)
  )

(vl-catch-all-apply
  'vlax-invoke-method (list si 'NumCustomInfo)
  )

(setq SummaryObj
      (vlax-get-property
        (vla-get-ActiveDocument
          (vlax-get-acad-object)
          )
        'SummaryInfo
        )
      )
TheSwamp.org  (serving the CAD community since 2003)

Birdy

  • Guest
Drawing Properties dialog
« Reply #6 on: June 29, 2005, 01:16:26 PM »
Thanks.  Will give that stuff a try, and fiddle with it some.
Hopefully I won't futz it all up. :)

daron

  • Guest
Drawing Properties dialog
« Reply #7 on: June 29, 2005, 01:59:46 PM »
Well, your first shot is still changeable how I said. Change the block in its native state and update your drawings as needed. The second one a bit different. Since they are currently attributes, you'll need to remove them  and edit the other att areas to read a tag_name. Although, they look like they are designed for a bit of flexibility. Converting them to constant might still work, but it can be tricky.

Birdy

  • Guest
Drawing Properties dialog
« Reply #8 on: June 30, 2005, 01:34:52 PM »
I think I'm not 'splaining well enough. (sorry)

I want to change the look of the dialog box. Not automate it being filled out.  I'm no code wiz, but it seems like the code you'uns posted will get drawing data and fill out the fields.  I use the fields to fill out the titleblock data. (now I'm gettin confused...)

In the summary tab, I wanna change the label "Title" to the label "Job Name" (etc)
and in the custom tab, change the edit box (with DATE in it) to a label "date".
IOW, can I hack the dcl code that produces this dialog box?

I have looked for the .dcl file and cant find it anywhere.

Birdy

  • Guest
Drawing Properties dialog
« Reply #9 on: June 30, 2005, 01:40:37 PM »
Daron, sorry. Not ignoring your input, just still trying to figure it out.  Working on it now...
...tick, tick, tick....

Crank

  • Water Moccasin
  • Posts: 1503
Drawing Properties dialog
« Reply #10 on: June 30, 2005, 04:25:17 PM »
Quote from: Birdy
[...]
IOW, can I hack the dcl code that produces this dialog box?

I have looked for the .dcl file and cant find it anywhere.

No, you can't hack it. That dialogbox is part of windows (not Autocad).
Rightclick on a .dwg file and do properties to see it.

Do you know the commands PROPULATE and DWGPROPS ?
Vault Professional 2023     +     AEC Collection

tcdan

  • Guest
Drawing Properties dialog
« Reply #11 on: June 30, 2005, 05:43:29 PM »
CAD Bug: try filling more than 10 custom properties then run propulate and tell it to "fill from current drawing".

Birdy

  • Guest
Drawing Properties dialog
« Reply #12 on: July 01, 2005, 10:56:16 AM »
Quote from: Crank
No, you can't hack it. That dialogbox is part of windows (not Autocad).

Kinda where I thought this might lead. I had a hunch this might not be something I can (or want to) mess with. Oh well.
Quote from: Crank
Do you know the commands PROPULATE and DWGPROPS ?

PROPULATE: Cool, that's a new one to me. This  may be useful to us, I'll investigate it further. Thank you Crank.
DWGPROPS: Am using it constantly now, and it helps us populate our titleblock.

Gonna back up some and rethink the whole process of creating & naming files and directories... and how we go about populating the titleblock info.

ELOQUINTET

  • Guest
Drawing Properties dialog
« Reply #13 on: July 01, 2005, 11:16:33 AM »
we eneter our job info into access here then extract that info from the entry and insert each as attributes

tcdan

  • Guest
Drawing Properties dialog
« Reply #14 on: July 01, 2005, 11:33:48 AM »
Dan - that sounds like a good way to go!  Do you use VBA to talk to Access?  And why Access instead of Excel (besides the pretty interface)?