×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

File path in acad 2000

File path in acad 2000

File path in acad 2000

(OP)
HI can you help me?

I am trying to find a way to input file PATH in ACAD dwg.
(automaticaly)
Thanks in advice
ZMEI

RE: File path in acad 2000

Dear zliazmei,

The below VisualLISP code inserts a text object containing
the filename and filepath of the current drawing at the position 0,0 . Just follow the constructions.
1. Copy the below expressions and paste them into a text
   file.
2. Save the file with the name FF.LSP .
3. Enter the AutoCAD environment and load the saved file
   using the command "APPLOAD".
4. Enter FF at the command line.


(defun c:FF(/ acadObject acadDocument
        documentPath documentName)
  (vl-load-com)
  (setq acadObject (vlax-get-acad-object))
  (setq acadDocument (vla-get-ActiveDocument acadObject))
  (setq documentPath (vla-get-Path acadDocument))
  (setq documentName (vla-get-Name acadDocument))
  (command "._TEXT" '(0 0) "" ""
       (strcat documentPath "\\" documentName))
  (princ)
)


Notice: If the current text style has a default height not equal to zero, the above program will interrupt and has no output.

If you want to run the program automatically every time you open a drawing, you can add the above code in file acaddoc.lsp (in the function s::startup).

In case of any doubt don't hesitate to be in touch with me using the present web page.

:)
Farzad

RE: File path in acad 2000

(OP)
Thanks Farzad

RE: File path in acad 2000

You can also use diesel (sp?( language. I used to use it to put the full path in the titleblock but haven't done so for awhile. Was very simple to do. Should be able to find instructions in the help files.

Gordy

RE: File path in acad 2000

In your Autocad 2000 if you have express tools loaded you should have RTEXT. RTEXT will allow you to use coding to make this happen.
At the command propmt type in RTEXT and return, type D for deisel. When the dialog box pops up type in the following code.

$(getvar, "dwgprefix")$(getvar, "dwgname")          $(edtime, 0, MONTH DD"," YYYY - HH:MMam/pm)                  Printed By:  $(getvar, "loginname")

This should be all on one line. I place this in my border, it will update even if you do a save as.

I hope this helps.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources