Author Topic: text removal question  (Read 5210 times)

0 Members and 1 Guest are viewing this topic.

diarmuid

  • Bull Frog
  • Posts: 417
text removal question
« on: June 30, 2004, 11:57:44 AM »
is there a routine out there i can get my hands on that will allow me to delete a word in a dtext line by just selecting it with the pickbox?

"...all concrete proposed surrounds to be minimum 200MM thick"

i want to remove the words "proposed"

we have alot of drawings that are now as built so "proposed" is now defunct.

thanks in advance

Diarmuid
If you want to win something run the 100m, if you want to experience something run a marathon

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
text removal question
« Reply #1 on: June 30, 2004, 12:01:28 PM »
Varous text search and replace utilities abound on the net, just use a capable one and search for "proposed", replace with "".
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

VerticalMojo

  • Guest
text removal question
« Reply #2 on: June 30, 2004, 12:04:02 PM »
Quote from: MP
Varous text search and replace utilities abound on the net, just use a capable one and search for "proposed", replace with "".


find and replace..... thats my bet too....

diarmuid

  • Bull Frog
  • Posts: 417
text removal question
« Reply #3 on: June 30, 2004, 12:15:19 PM »
its a little bit more complicated than what your suggesting, because some of the discipline have used prop. instead of proposed and there is still other sections of the complex, not part of this contract that is still proposed.

so a blanket find and replace would not be suitable in this instance.

thanks in advance

Diarmuid
If you want to win something run the 100m, if you want to experience something run a marathon

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
text removal question
« Reply #4 on: June 30, 2004, 12:21:18 PM »
Friendly note: The applicablility of a proposed solution is generally proportionate to the clarity of the problem definition. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

VerticalMojo

  • Guest
text removal question
« Reply #5 on: June 30, 2004, 12:21:35 PM »
Quote from: diarmuid
its a little bit more complicated than what your suggesting, because some of the discipline have used prop. instead of proposed and there is still other sections of the complex, not part of this contract that is still proposed.

so a blanket find and replace would not be suitable in this instance.

thanks in advance

Diarmuid


I see...... yer right, It would be routine then.... Sorry cant help you there Diarmuid :?

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
text removal question
« Reply #6 on: June 30, 2004, 12:34:25 PM »
is this what you want??

warning ..... no error checking ....... use at your own risk
Code: [Select]

(defun c:rword (/ word ent obj txt_str new_txt_str)
  (setq word (getstring "\nEnter word to remove: "))

  (while
(setq ent (car (entsel "\nPick Dtext...")))

(setq obj (vlax-ename->vla-object ent))

(setq txt_str   (vlax-get-property obj 'TextString)
  new_txt_str (vl-string-subst "" (strcat " " word) txt_str)
  )

(vlax-put-property obj 'TextString new_txt_str)

(vlax-release-object obj)
)
  (princ)
  )
TheSwamp.org  (serving the CAD community since 2003)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
text removal question
« Reply #7 on: June 30, 2004, 02:16:17 PM »
I still fail to see why Find cannot be used. If you know what the string is, and which you wish to change, it is a simple proposition to select the group to change and apply the change to that group only. Simply apply it for each variation of "proposed"
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

VerticalMojo

  • Guest
text removal question
« Reply #8 on: June 30, 2004, 02:21:06 PM »
I was thinking maybe he wanted to do it all at once without having some extra steps involved (like having to do proposed, then another for prop.).....

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
text removal question
« Reply #9 on: June 30, 2004, 02:35:56 PM »
Well if that is the case, we need a whole lot more information than what has been given to date, and the program would not be useful once it has done it's job.
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

diarmuid

  • Bull Frog
  • Posts: 417
text removal question
« Reply #10 on: July 01, 2004, 04:54:52 AM »
thanks Mark, what i'm looking for is to just initiate the routine by a button and just pan through the drawing and with the mouse just select the word, which would be in the middle of a sentence or at the start or end etc and just click on it and it is deleted, then move to the next piece of text, the technican will have A3 mark ups with the words to be deleted circled.

Keith Quoted:
I still fail to see why Find cannot be used. If you know what the string is, and which you wish to change, it is a simple proposition to select the group to change and apply the change to that group only. Simply apply it for each variation of "proposed"

its a little more complicated than that, keith, in the sence that we would be hoping for students etc in the summertime to be able to comein and perform that task which is mindnumbingly boring. and its simple to show how to use.

the programme would still have a purpose in our company because we have a policy of removing the words "prop." "proposed" and "future" from all of our engineering jobs.  to date on one current project there are 400 drawings.  this programme would allow a junior technician to go through the drawings an eliminate the said words.  (all of our text is in dtext, its the standard).  so it does have a useful function, because it streamlines the drafting process, and eliminates the repetition of having to edit the text and remove the text etc...

thanks for the help guys
If you want to win something run the 100m, if you want to experience something run a marathon

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
text removal question
« Reply #11 on: July 01, 2004, 05:28:17 AM »
Quote from: diarmuid
thanks Mark, what i'm looking for is to just initiate the routine by a button and just pan through the drawing and with the mouse just select the word, which would be in the middle of a sentence or at the start or end etc and just click on it and it is deleted, then move to the next piece of text, the technican will have A3 mark ups with the words to be deleted circled.

That's basically what I did, right?
TheSwamp.org  (serving the CAD community since 2003)

diarmuid

  • Bull Frog
  • Posts: 417
text removal question
« Reply #12 on: July 01, 2004, 06:02:45 AM »
ok stupid question...

i've tried to run the file, i'm only at my machine as of this minute and i seem to be unable to get the file to run.  i've tried saving it as .lsp, .fas, .vlx, .arx and it wont run?

i must be doing something stupid...
If you want to win something run the 100m, if you want to experience something run a marathon

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
text removal question
« Reply #13 on: July 01, 2004, 06:15:05 AM »
copy text in "code" window
paste to file (notepad)
saveas rword.lsp
drag -n- drop from Windows Explorer into ACAD
on the command line in ACAD type in rword
did that work?
HTH
TheSwamp.org  (serving the CAD community since 2003)

diarmuid

  • Bull Frog
  • Posts: 417
text removal question
« Reply #14 on: July 01, 2004, 06:19:38 AM »
it did work,(i never copied one of the brackets, duhhhh, if i had a brain...) but would it be possible to just select the word that was to be deleted.

ie.  start the lisp...select "prop" in a dtext line and it goes...then just select "future" on a different line and zap it goes as well?

Thanks Mark
If you want to win something run the 100m, if you want to experience something run a marathon

hendie

  • Guest
text removal question
« Reply #15 on: July 01, 2004, 06:36:14 AM »
think in this situation, since the exact string is known, I would have been tempted to use "superfind" ~ that way, you wouldn't even need to open the drawings and the whole thing could be done in minutes instead of having someone sit there and go through the entire list manually.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
text removal question
« Reply #16 on: July 01, 2004, 07:43:23 AM »
TheSwamp.org  (serving the CAD community since 2003)

ELOQUINTET

  • Guest
text removal question
« Reply #17 on: July 01, 2004, 09:45:51 AM »
ah the ineveitable question  :?:

how to modify to work with mtext too

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
text removal question
« Reply #18 on: July 01, 2004, 10:11:27 AM »
If'n you are talking about Marks routine it will work with MText as well as DText, the only thing I can see is that it does not find words at the beginning of the sentence unless you preceed them with a space. but otherwise a good tool
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

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
text removal question
« Reply #19 on: July 01, 2004, 10:19:45 AM »
Quote from: eloquintet
ah the ineveitable question  :?:

how to modify to work with mtext too


Open acad_dev.chm
go to ActiveX and VBA Reference
click on Object Model
scroll down til you see MText (in blue) click on it
examine Properties
TheSwamp.org  (serving the CAD community since 2003)

ELOQUINTET

  • Guest
text removal question
« Reply #20 on: July 01, 2004, 10:21:36 AM »
mmm downloaded the latest and doesn't work:

"selected object was not dtext"

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
text removal question
« Reply #21 on: July 01, 2004, 10:41:19 AM »
Quote from: eloquintet
mmm downloaded the latest and doesn't work:

"selected object was not dtext"

No it won't. See post above yours.
TheSwamp.org  (serving the CAD community since 2003)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
text removal question
« Reply #22 on: July 01, 2004, 11:25:06 AM »
Oh .. so you posted a NEW version ... I was looking at the one where you posted the code.
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