PDA

View Full Version : Annotative scale in field?



mockdeep
2007-10-11, 02:54 PM
I am trying to create a block with an attribute where the default value is the annotative scale. Is that possible?

RobertB
2007-10-11, 04:26 PM
Does Other, System Variable, CAnnoScale address your issue?

mockdeep
2007-10-11, 04:45 PM
I though so when you said it, but the problem is that it changes whenever I change the annotation scale I'm working on. I am trying to create a drawing label that does the following:

a) Fills in the scale heading automatically when I insert it based on the current annotation scale, but doesn't change when I change the current annotation scale.

b) Changes the scale heading whenever I change the block's annotation scale manually.

I can probably do without the second part as it would require a field, whereas, I'm not so sure the first part does. Is there a way to set an initial static value when you insert it based on the current annotation scale?

Shinyhead
2007-10-11, 05:05 PM
yeah, you can do that, but don't use a field if you don't want it to change.
The following is for LT, so there may be a fancy "lispy" way to do it as well.

Make a macro that does a block insert for your block, and make sure attreq is 1 and attdia is 0, then use diesel to $m=$(getvar,cannoscale); when the prompt for that attribute comes up. May take a try or two to get the order right on the attributes, but its pretty easy to set up.

You can also use a field that calls the cannoscale variable, and I am wondering why its an issue when you change annoscale, what counts is how it looks through a viewport, in which case it will show the cannoscale of the viewport. Unless you are plotting from modelspace.

RobertB
2007-10-11, 05:07 PM
I don't think you can accomplish what you want without customization. I may be mistaken, but I see no object field for an object's annotation scale.

Shinyhead
2007-10-11, 05:15 PM
I use this code for the field to get it into a format I like

%<\AcDiesel $(RTOS,$(/,12,$(SUBSTR,$(GETVAR,CANNOSCALE),3)))>%

the attribute follows the field with
"=12"

this will then give you something like

1-1/2"=12" which is the format most of our clients prefer.

If you make sure it is in a block, and it is an annotative block, just make sure that only the annotation scales you want it to display in are in the objects scale list. This is how we handle the viewlabels and it works nicely.

mockdeep
2007-10-11, 07:24 PM
You can also use a field that calls the cannoscale variable, and I am wondering why its an issue when you change annoscale, what counts is how it looks through a viewport, in which case it will show the cannoscale of the viewport. Unless you are plotting from modelspace.

I tried this but in model space fields at different scales update to the current anno scale and in paper space they seem to do whatever they want. I dropped in two blocks at two scales (3/8" & 1-1/2") and left the anno scale at 1-1/2". In model space they both showed up at 1-1/2" and in paper space in two different scaled viewports they showed up at 3/8". I fiddled around a little bit, not really doing much of anything, checked again and regened again and in paper space one showed 1-1/2" and the other 3". I regened again and now they are both stuck at 1-1/2".


I use this code for the field to get it into a format I like

%<\AcDiesel $(RTOS,$(/,12,$(SUBSTR,$(GETVAR,CANNOSCALE),3)))>%

the attribute follows the field with
"=12"

this will then give you something like

1-1/2"=12" which is the format most of our clients prefer.

If you make sure it is in a block, and it is an annotative block, just make sure that only the annotation scales you want it to display in are in the objects scale list. This is how we handle the viewlabels and it works nicely.
I'm not familiar with Diesel, but I tried to put that expression in under "DieselExpression" and it gives me "Invalid Field Code". If I paste it in the attribute it shows a field with 1'-0", regardless of the scale I insert it at. I think I might just need to let it be for a while until I understand it all a little better. Tricky stuff.