Jump to content

diesel to select last caracter filename


Recommended Posts

Hello i use diesel for attributte fields and in scripts.

I use,

%%

for getting the drawing name. Playing with the numbers to get a goot result.

 

But I have drawings with the name for example MDG-BM-001-A.

I only want have the last character (Revison A) But the file/drawing names can contain more or less characters so this Diesel macro does not always give a good result. i am looking for a Diesel macro that counts from the right to the left.

 

Thanks,

 

PmxCAD

Link to comment
Share on other sites

Steven,

 

Is it possible to combine your Diesel macro above with:

 

(setq CurrDwgName (getvar "CTAB"))

(setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName)0)))

(setq name (strcat (getvar "DWGPREFIX") Fname".pdf"))

;Command:

FILEDIA

;Enter new value for FILEDIA :

0

;Command:

-plot

 

 

 

 

!name

 

 

;Command:

FILEDIA

;;;Enter new value for FILEDIA :

1

 

 

To get a pdf with the TAB name and the revision letter of the file name?

like: tabname-A

 

thanks

pmxcad

Link to comment
Share on other sites

No,

Its a script that I use for plotting to PDF without the file name . only the tab name.

 

Maybe someone else ?

 

Pmxcad

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...