TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Mark on November 18, 2003, 09:33:42 AM

Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark 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?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron 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}")
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: SMadsen 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.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: SMadsen on November 18, 2003, 10:21:34 AM
Beaten by Daron in .. umm, 6 minutes. Man, I'm a slow typer!
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron on November 18, 2003, 10:23:53 AM
6 minutes. Too funny, Stig. You fall asleep?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet 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
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: SMadsen on November 18, 2003, 10:26:00 AM
zzzzZZZZZZZZZZZ
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron 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.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 18, 2003, 10:55:22 AM
yes something along those lines daron
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark 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
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet 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
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark 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.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet 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
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark 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?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark 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?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 18, 2003, 12:12:58 PM
ummm in answer the first question, this is more of a safeguard than anything just so a dimension might not getting selected by accident. i have tons of dims i'm dealing with, some of them are centered and some right and left justified to show up in details. in reply to the second question, the text files works great i was moreso responding to daron because i'm not familiar with vba. your setup is perfect  :D

dan
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark on November 18, 2003, 12:41:53 PM
Do you want an alert box if;
A) the dim HAS an override in place?

B) the dim does NOT have an override in place?

C) none, I hate alert boxes.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 18, 2003, 12:51:38 PM
A) by the way check this out pretty funny:

www.kaiju.com (i'm going friday night)
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark on November 19, 2003, 07:29:07 AM
Well I thought about this app some more and I think we are going to change the look and options just a tad. I think this might be a good solution.

(http://www.theswamp.org/swamp.files/mark/txtoverrides.png)

this will allow you to change the current override or select one from a list. Any thoughts on this Dan?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 19, 2003, 08:04:07 AM
yes that looks good mark
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron on November 19, 2003, 08:36:01 AM
What's going in the Select Override pull down?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 19, 2003, 08:47:36 AM
various suffixes such as v.i.f., o.a., d.l.o. etc. etc. different suffixes i commonly use in my shop drawings.

dan
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron on November 19, 2003, 08:50:41 AM
What about one's not commonly used? Would you just write that into the current override and leave it at that?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 19, 2003, 09:02:14 AM
i want to make it easy to edit so i can add or remove different job specific suffixes as i need them too yes. that's why mark was using the txt file way i think so it's easy for me to do that.  :D

dan
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: CAB on November 19, 2003, 09:05:09 AM
How about a button "ADD to list" that was dimmed until you manually entered a value. If the entered data did not match anything in the "Common" list the button would become active and you could add it to the list.

CAB
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron on November 19, 2003, 09:05:46 AM
So, what you're saying Dan, is the dcl generates a read-line of a text file and if you want to add a pre/suf-fix, you need to change the text file? That'll work, but wouldn't it be quicker to just change the current override box?
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark on November 19, 2003, 09:18:12 AM
>How about a button "ADD to list"
thats a good idea CAB, I thought about that too. Maybe in the next version.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron on November 19, 2003, 09:23:14 AM
I like that idea too. That way you don't have to manually add it to the text file. Thought of caution, just in case you don't think of it: use vl-sort to alphabetically list your pull-down. You've probably already done that though.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark on November 19, 2003, 09:36:58 AM
>use vl-sort to alphabetically list your pull-down
Why not acad_strlsort ? Actually I haven't got that far yet, but thinks for the reminder.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron on November 19, 2003, 09:39:40 AM
Yeah, that'll work too. Vl-sort was just the first thing that came to mind. Actually, I've never used acad_strlsort. I never needed to sort anything until after vl- functions came out.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark on November 19, 2003, 01:54:06 PM
Dan, give this a look see.
http://www.theswamp.org/swamp.files/mark/DimTextOverRide.VLX

start with ETOR
select multiple dims
change at will. :D
the list is fixed in the program, for now. that will change soon.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Anonymous on November 19, 2003, 02:22:44 PM
woah you guys have been busy over here. i'll give it a try mark a give my review. yes that was a good idea about the auto add to list thanks guys for your input.

dan
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Anonymous on November 19, 2003, 03:16:12 PM
hmmm mark looks good but... there's always a but huh
if the dim has a current override and i delete it from the list then add a new one it doesn't show up. also why do i type in etor when it should be dtor and while i'm at it why not just make it (or) i find 2 letters much easier to remember than 4. also about adding overrides later, how will i do this with a vlx? thanks man for all your efforts

dan
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: daron on November 19, 2003, 03:19:42 PM
Oh, now he's trying to get the source code. Beware Mark. Oh, I'm sorry, it's Dan. Login Dan.
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 19, 2003, 03:32:05 PM
yeah it's me guys it didn't automatically log me in  :oops:

dan
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Mark on November 24, 2003, 03:20:37 PM
New version, try this one Dan.
http://www.theswamp.org/swamp.files/mark/DimTextOverRide-0.5.zip
Title: Editing TEXT OVERRIDE with AutoLISP
Post by: Eloquintet on November 25, 2003, 10:29:51 AM
got the new version mark i'll try it out and let you know. thanks so much for your hard work.

dan