Author Topic: Editing TEXT OVERRIDE with AutoLISP  (Read 8919 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
Editing TEXT OVERRIDE with AutoLISP
« on: November 18, 2003, 09:33:42 AM »
If you were going to write a program to edit the text overrides of a dimension what would you like the program to do?
TheSwamp.org  (serving the CAD community since 2003)

daron

  • Guest
Editing TEXT OVERRIDE with AutoLISP
« Reply #1 on: November 18, 2003, 10:14:49 AM »
append text to the default values, either in front of or after the default value. Something like this:
Code: [Select]
(vla-put-TextOverride DimObj "{\\Farchquik.shx;<>\\XBSL}")

SMadsen

  • Guest
Editing TEXT OVERRIDE with AutoLISP
« Reply #2 on: November 18, 2003, 10:20:09 AM »
Is it correctly understood that your DPSX command adds texts to the properties TextPrefix and/or TextSuffix? If so, it results in creation of XData that overrides the parent dimstyle's DIMPOST variable.

Another method could be to use the TextOverride property. This will add text to group code 1 of the dimension's entity list. If it doesn't include "<>" then it will totally override the dimension text. If it includes "<>" then it will allow TextSuffix, Measurement and TextPrefix to show as well.

SMadsen

  • Guest
Editing TEXT OVERRIDE with AutoLISP
« Reply #3 on: November 18, 2003, 10:21:34 AM »
Beaten by Daron in .. umm, 6 minutes. Man, I'm a slow typer!

daron

  • Guest
Editing TEXT OVERRIDE with AutoLISP
« Reply #4 on: November 18, 2003, 10:23:53 AM »
6 minutes. Too funny, Stig. You fall asleep?

Eloquintet

  • Gator
  • Posts: 3206
Editing TEXT OVERRIDE with AutoLISP
« Reply #5 on: November 18, 2003, 10:24:03 AM »
mark i would like it setup just like the one we've already created but instead of adding the text as a suffix it would add it as an override so it would show up in the mtext editor for easy removal if need be. it would be nice if it could wipeout an existing override as well because if i have to erase the other one i might as well just type it in since i'm there. and again we wouldn't want the double suffix error. i would also like to have it so i can easily add overrides as i need them. that's it basically if you have any more questions i'm here all day long  :wink:

dan
Dan

AutoCAD Architecture 2015

SMadsen

  • Guest
Editing TEXT OVERRIDE with AutoLISP
« Reply #6 on: November 18, 2003, 10:26:00 AM »
zzzzZZZZZZZZZZZ

daron

  • Guest
Editing TEXT OVERRIDE with AutoLISP
« Reply #7 on: November 18, 2003, 10:32:58 AM »
I didn't see your previous one, but in a vba form or dcl file you could have a textbox or whatever it's called that contains the text string you intend to overwrite. Or, you could have buttons that ask if you want to overwrite or append.

WAKE UP Stig. The boss is coming.

Eloquintet

  • Gator
  • Posts: 3206
Editing TEXT OVERRIDE with AutoLISP
« Reply #8 on: November 18, 2003, 10:55:22 AM »
yes something along those lines daron
Dan

AutoCAD Architecture 2015

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
Editing TEXT OVERRIDE with AutoLISP
« Reply #9 on: November 18, 2003, 11:01:58 AM »
Quote from: eloquintet
mark i would like it setup just like the one we've already created but instead of adding the text as a suffix it would add it as an override so it would show up in the mtext editor for easy removal if need be. it would be nice if it could wipeout an existing override as well because if i have to erase the other one i might as well just type it in since i'm there. and again we wouldn't want the double suffix error. i would also like to have it so i can easily add overrides as i need them. that's it basically if you have any more questions i'm here all day long  :wink:

dan

So we're going to have two lists, one for the front of the dim(<>) and one for the back. The TextOverride will go on the front, back, or both depending on what the user selects from the lists.

Do you want an option to remove any overrides that exist?

Do you always want to overwrite any existing text? <- this is a biggey
TheSwamp.org  (serving the CAD community since 2003)

Eloquintet

  • Gator
  • Posts: 3206
Editing TEXT OVERRIDE with AutoLISP
« Reply #10 on: November 18, 2003, 11:17:31 AM »
umm a remove option would be great. the overwrite would not be neccesary if it showed the existing overrides and gave me the option to remove them then add the new ones.

dan
Dan

AutoCAD Architecture 2015

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
Editing TEXT OVERRIDE with AutoLISP
« Reply #11 on: November 18, 2003, 11:42:42 AM »
Quote from: eloquintet
umm a remove option would be great. the overwrite would not be neccesary if it showed the existing overrides and gave me the option to remove them then add the new ones.

dan

Sorry, I'm still confused! Lets say you have a dim that looks like this;
15.0" BACK
You start the program, select an item from the "back" list that reads "OTHER", you then select the dim 15.0" BACK on the screen. Do you;
A) replace BACK with OTHER so it looks like 15.0" OTHER

B) append OTHER to the dim like so 15.0" BACK OTHER

C) option to do B above.
TheSwamp.org  (serving the CAD community since 2003)

Eloquintet

  • Gator
  • Posts: 3206
Editing TEXT OVERRIDE with AutoLISP
« Reply #12 on: November 18, 2003, 11:49:15 AM »
A) would do fine

i was thinking that the dialog would have the existing override but neglected to remember that you would have to select the dimension first to have that option. A) is fine. just as long as it tells you that the dimension has an existing override. i don't think i would ever append just replace.

dan
Dan

AutoCAD Architecture 2015

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
Editing TEXT OVERRIDE with AutoLISP
« Reply #13 on: November 18, 2003, 12:00:39 PM »
> just as long as it tells you that the dimension has an existing override.

but wouldn't you see that when you select the dim?
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
Editing TEXT OVERRIDE with AutoLISP
« Reply #14 on: November 18, 2003, 12:04:05 PM »
Quote
i would also like to have it so i can easily add overrides as i need them.

Editing the two .txt files isn't easy enough? Or do you have something else in mind?
TheSwamp.org  (serving the CAD community since 2003)