TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started 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?
-
append text to the default values, either in front of or after the default value. Something like this:
(vla-put-TextOverride DimObj "{\\Farchquik.shx;<>\\XBSL}")
-
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.
-
Beaten by Daron in .. umm, 6 minutes. Man, I'm a slow typer!
-
6 minutes. Too funny, Stig. You fall asleep?
-
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
-
zzzzZZZZZZZZZZZ
-
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.
-
yes something along those lines daron
-
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
-
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
-
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.
-
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
-
> 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?
-
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?
-
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
-
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.
-
A) by the way check this out pretty funny:
www.kaiju.com (i'm going friday night)
-
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?
-
yes that looks good mark
-
What's going in the Select Override pull down?
-
various suffixes such as v.i.f., o.a., d.l.o. etc. etc. different suffixes i commonly use in my shop drawings.
dan
-
What about one's not commonly used? Would you just write that into the current override and leave it at that?
-
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
-
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
-
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?
-
>How about a button "ADD to list"
thats a good idea CAB, I thought about that too. Maybe in the next version.
-
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.
-
>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.
-
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.
-
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.
-
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
-
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
-
Oh, now he's trying to get the source code. Beware Mark. Oh, I'm sorry, it's Dan. Login Dan.
-
yeah it's me guys it didn't automatically log me in :oops:
dan
-
New version, try this one Dan.
http://www.theswamp.org/swamp.files/mark/DimTextOverRide-0.5.zip
-
got the new version mark i'll try it out and let you know. thanks so much for your hard work.
dan