Author Topic: How can this be done?  (Read 6262 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7529
How can this be done?
« on: March 25, 2004, 11:32:46 AM »
I have a friend working at a company and he just emailed me this message:

Quote
Is there anyway I can lock a drawing so that other people can't change the drawn by name?  A co-worker here is doing no work and changing the name on my dwgs and telling the boss that she is doing all this work.


Has anyone ever had to deal with this before?  Any suggestions?

Thanks,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How can this be done?
« Reply #1 on: March 25, 2004, 11:39:34 AM »
I have a solution but it's not for any newbie. Does your friend know who to edit menus or create a custom menu?
TheSwamp.org  (serving the CAD community since 2003)

ELOQUINTET

  • Guest
How can this be done?
« Reply #2 on: March 25, 2004, 11:44:28 AM »
uh i feel a bitch slap is in order

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How can this be done?
« Reply #3 on: March 25, 2004, 11:46:01 AM »
Actually, now that I've looked at the program! It's not that difficult to run. What is does is basically signs the dwg with the users name. Of course no one can see that signature. :D
TheSwamp.org  (serving the CAD community since 2003)

ronjonp

  • Needs a day job
  • Posts: 7529
How can this be done?
« Reply #4 on: March 25, 2004, 11:57:51 AM »
Quote
Actually, now that I've looked at the program! It's not that difficult to run. What is does is basically signs the dwg with the users name. Of course no one can see that signature


Hey Mark,

This sounds interesting, could you enlighten me?

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How can this be done?
« Reply #5 on: March 25, 2004, 12:00:29 PM »
Take a look .
Code: [Select]

;;; FUNCTION
;;; inserts a text object containing the login name of the current user
;;; in Modelspace on 0 layer which is not visible
;;;
;;; ARGUMENTS
;;;
;;; USAGE
;;;
;;;
;;;
;;; PLATFORMS
;;; 2000+
;;;
;;; AUTHOR
;;; Copyright© 2002 Mark S. Thomas
;;; mark.thomas@theswamp.org
;;;
;;; VERSION
;;; 1.2 Thu Mar 25, 2004 11:48:11
(defun c:set-name-of-creator (/ *mspace* ln fnd txtobj)

  (vl-load-com)

  (setq *mspace*
    (vlax-get-property
      (vlax-get-property
        (vlax-get-acad-object)
        'ActiveDocument)
      'ModelSpace)
    )

  (if (not (setq ln (getvar 'loginname)))
    (progn (alert "Sorry, no login name found")(exit))
    )

  (vlax-for item *mspace*
            (if (= (vlax-get-property item 'ObjectName) "AcDbText")
              (if (= (vlax-get-property item 'TextString)
                   (strcat "Created by " ln)
                   )
                (setq fnd T)
                ); if
              ) ; if
            )


  (if (not fnd)
    (progn
      (setq txtobj
            (vla-addText
              *mspace*
              (strcat "Created by " ln)
              (vlax-3d-point '(0.0 0.0 0.0))
              0.000001
              )
            )
      (vlax-put-property txtobj 'Visible :vlax-false)
      (if (not (vlax-object-released-p txtobj))
        (vlax-release-object txtobj))
      ); progn
    ); if

  (princ)

  ); defun
TheSwamp.org  (serving the CAD community since 2003)

ronjonp

  • Needs a day job
  • Posts: 7529
How can this be done?
« Reply #6 on: March 25, 2004, 12:14:50 PM »
Mark,

I ran the routine and this is what I get:

 error:
bad argument type: VLA-OBJECT nil

This happens the second time I run it?

Also,

How do you recall this information it inserts so you can see it (prove its there)?

Thanks,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How can this be done?
« Reply #7 on: March 25, 2004, 12:18:15 PM »
hang on, let me fix it.
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How can this be done?
« Reply #8 on: March 25, 2004, 12:25:41 PM »
Ok, fixed it.

>How do you recall this information it inserts so you can see it (prove its there)?

type in 'find'
enter "created by" in the search box.
TheSwamp.org  (serving the CAD community since 2003)

ronjonp

  • Needs a day job
  • Posts: 7529
How can this be done?
« Reply #9 on: March 25, 2004, 12:29:46 PM »
Do I get to see the fixed version? :D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ronjonp

  • Needs a day job
  • Posts: 7529
How can this be done?
« Reply #10 on: March 25, 2004, 12:33:17 PM »
Nevermind Mark.

Thanks you very much for your help.

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Doppie

  • Guest
How can this be done?
« Reply #11 on: March 25, 2004, 01:12:10 PM »
I am the one having this problem this is cool but its not exactley what i was lookin for.  I was thinking of the same type of thing but text on the drawing that could bee seen and not changed.  Something like having an attribute so that you can not change the value of the default  ei. “Drawn By” name. but still cahng other information within the same attribute like date customer name address....
Thanks for your help

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How can this be done?
« Reply #12 on: March 25, 2004, 01:44:36 PM »
- Doppie
what version of ACAD are you using?
TheSwamp.org  (serving the CAD community since 2003)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
How can this be done?
« Reply #13 on: March 25, 2004, 02:00:24 PM »
You can make the attribute of the block preset and constant. Then it could not be edited. You will of course have to update the block with attsync
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Doppie

  • Guest
How can this be done?
« Reply #14 on: March 25, 2004, 02:55:54 PM »
I am using architectural desktop 3.3
thanks for your help

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How can this be done?
« Reply #15 on: March 26, 2004, 09:54:05 AM »
Well I can't come up with anything else, not right now anyway. :D
TheSwamp.org  (serving the CAD community since 2003)