OK,
I am having problems with getting spaces because of the way diesel handles quotes. It may be possible, but I couldn't get it in the few minutes I have right now to play with it.
|
OK,
I am having problems with getting spaces because of the way diesel handles quotes. It may be possible, but I couldn't get it in the few minutes I have right now to play with it.
You may need two versions of my macro, if the scale exists in the list it is going to fail the macro when it goes to add it to the scale list. So you may have to have 2 macros, one for existing scale, and one for new scale. I will think on if there is a way around this, but for right now thats all I can figure on it. I do not think I can make an if that will fit and I cant get the command structure to play nice because the scalelist wants an "E" to exit, which makes it trickier.
Hi!
Regarding the space in the "Layout" name, I had the same problem.
The easiest thing to do is to add underscore "_" between words or characters
as needed. I updated my template and everthing work fine from that side...
As for the other part, I'm playing around with your latest incarnation. I have few
more test to do. But I was thinking, if it is a problem with already having the
scale on your list....would it work by emptying the list from the template drawing...
So any new drawing would have no scale other then "1:1". I guess there would
always be the situation were if you place a second viewport with the same scale
it would be a problem....would it not just ask you if you want to redefine it???
Jean
PS By the way, what did you change in your "VIEWLABEL", I saw that you had a
"CUI_VIEWLABEL" version....
I like the idea of not having any scales, but as soon as you add the second viewport with the same scale you are back in the same boat. And you cant delete them because the scale is referenced (I tried that too).
The viewlabel vs. cui_viewlabel is just a change from a clients viewlabel. I didn't think they would want me giving out the basic symbol itself (all the fields and such are mine) so I put in a generic label. Just making it more generic.
Just a dirty little LT secret. LT does not have the field creation command dialog box. BUT you can cut and paste fields. In fact if you have acad full you can cut the actual text string of a field and paste it into LT and the field will work. Make sure fieldeval is set the way you want (you need full to do this, it is a setting that stays with the drawing).
We use fields all the time with LT, you just have to make sure the users don't overwrite them. I am working on a text document that will have the raw strings so someone without full can cut and paste into LT. For instance, if you paste this..
%<\AcVar ctab>%
into the sheet number attribute of a titleblock, it will match the layout tab name.
No field command needed.
So, I've read about inserting a string that lists the current value, but is there something I can do to update these text strings?
Can I create a block in full version that has fields in it and insert that block into a drawing in LT? I don't want to have to use Full every time for every drawing to insert the fields. If I create a block with attributes that are actually fields will this do it and will it work in LT?
It's interesting to me that LT will recognize the ctab value with spaces and paste it using the AcVar ctab string, but won't utilize it in the macro for the viewport.
Hi again!
So I tried the macro, had a few problem. Found that they were related to the
lenght of the command, made the correction and worked great. So first off, what is the
maximum lenght of character you can have in a MACRO? Is it 330 characters?
Also, I still have the issue with duplicate scales as we know. I don't know anything
about MACRO or DIESEL, but just working throught that routine made me learn a lot.
So I investigated some more and I found the "if" expression. So that got me thinking....
What about using the "if" option before the SCALELISTEDIT....like having a statement
where the routine would check the scale list (can it be done?), if it did not find an existing
scale. It would carry on with the rest of the routine. Otherwise it would bypass the
scalelistedit portion of the routine and carry on with the CANNOSCALE portion.
Can it be done?
Now, since it seems to be an issue with how many character can be in a MACRO,
Could it be possible to run a script/macro within the macro? For instance, having a script
doing part of the command like layout and layers stuff and than add the "_script"
command to run it.....
example _script;"keyplan.scr"; ....... along that line....
Does that make sense???
Jean
Ah, good idea, I have done things like that with scripts in the past, here are the things you have to remember:
Once a script is fired, the macro is basically over. You can't return to the macro after that, so it has to be the last thing done.
Once you are in the script there is no diesel and you cannot get any user input.
If you can make it work within those limits then your probably on the right track.
If statements in diesel are cool, but they take up a lot of characters, one thing to look at, the help says there is no length limit for macros. This is in the 08 help. Before this was not the case so I don't know where the truth lay. I did just paste in a huge amount of characters to the macro window in the cui macro editor and in the tool palette tool properties editor, so it might be true for 08.
There is a limit to the number of $( calls to diesel, I think its 12, but I am not sure anymore.
Great idea! I just found this post, and hope to try it tomrrow, or sometime this week. I just wanted to say thank you!
No problem, I have been refining it quite a bit so if you stay tuned (aka remind me later), I will post an updated version that words better.