Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

File path in acad 2000 1

Status
Not open for further replies.

zliazmei

Structural
Feb 5, 2002
97
HI can you help me?

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

Recommended for you

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
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor