ammobake Posted July 10, 2019 Posted July 10, 2019 Does anyone know if there's a way to add a background mask to an attribute definition? I'm on ACAD 2019. I have a drawing with standard major/minor topo contour lines. They are all polylines with zero elevation - (someone created this base drawing in a very unorthodox way) The labels are what I'm trying to update. All the contour labels are blocks. The block consists of attdef text with a hatched background mask behind it. BUT I don't want this because the client's plot style prints the existing mask solid black which blacks out the contour label text. I'm trying to keep the labeling so I don't have to manually relabel everything so I can't really remove the attdef from the block. The client is using a standard STB in this drawing so all the plot styles are named or layer based. My hope was that there would be some way to update the block, save the edits and have everything update at once. I also can't just make the text print white over the black background because the plot style is not color dependent - the plot settings are set in stone per the STB settings which I am not allowed to edit. ChriS Quote
CyberAngel Posted July 10, 2019 Posted July 10, 2019 Have you tried a wipeout? Define one to cover the area behind the attribute. For some reason (this may have been fixed, but I doubt it), entities inside a block are in reverse draw order. In other words, if you set the wipeout to draw behind the attribute, it will instead obscure the attribute. So you have to draw the wipeout in front of the attribute to make sure it is drawn behind the attribute. But try it the logical way first. Quote
tombu Posted July 10, 2019 Posted July 10, 2019 All the STB files I've used have a Normal Plot Style which plots in color. Edit the block and set attribute hatched background mask color to 255 or True Color 1,1,1. Civil 3D labels should work and the lisp I use inserts Mtext with Fill Color set to Use drawing background color. Quote
ammobake Posted July 11, 2019 Author Posted July 11, 2019 Thanks guys. I ended up using a wipeout in the case of my block. I've never been forced to use a wipeout but in this case I think it's one of the only options. I tried a variety of other methods with no dice - just because of how the client has the STB set up. ChriS Quote
tombu Posted July 11, 2019 Posted July 11, 2019 1 hour ago, ammobake said: Thanks guys. I ended up using a wipeout in the case of my block. I've never been forced to use a wipeout but in this case I think it's one of the only options. I tried a variety of other methods with no dice - just because of how the client has the STB set up. ChriS Setting the Plot Style for all the contour labels to Normal didn't work? Quote
ammobake Posted July 11, 2019 Author Posted July 11, 2019 It might. with this particular client we aren't allowed to change anything related to the plot style or the layering scheme. In fact any user-created layers or any layers other than DEFPOINTS and layer 0 that aren't set up with their layer-naming scheme have to be purged out completely per their standards. The way it's set up, you create the layer name for what you need to add to your drawing, the STB then automatically assigns the linetype, lineweight, transparency and plot style setting to that layer so it jives with the STB. They use like an excel spreadsheet that breaks down how to add the layers. It's actually pretty complex but not bad when you get the hang of it. This project also had me delving deep into sheet set manager. But I really like it so far. So many things you can do with it. This client even uses data links for the sheets where it automatically fills in the titleblock for u with all the project data, sheet name, etc.. I call it data links but it's actually custom settings in the sheet set manager that do this. It's different, but cool. ChriS Quote
tombu Posted July 12, 2019 Posted July 12, 2019 Huge fan of STBs, all I've used since they were available. Like any other property with an STB you can assign any Plot Style in the STB to an object which overrides the layer Plot Style. All the STBs than install and all I've ever seen have a Normal Plot Style you could've assigned to those contour label objects. If not I'm sure they include a Plot Style like it that simply uses object properties like Normal does. I wasn't suggesting modifying their STB at all just changing the Plot Style of that attdef text in the Block Editor. We used Autodesk-MONO.stb that installs with AutoCAD for many years which has 9 grayscales, but later switched to FDOT.stb from Florida Dept of Transportation to be compatible. It's really simple and only has 5 Plot Styles: Normal, Black, three grayscales, and a screened (similar to transparent) version of Normal that works great for solid hatching. Our layers are assigned Lineweights, Linetypes, Colors (for Normal Plot Style & appearance) and Plot Styles in our templates so they're easily viewed or modified in the Layer Properties Manager. Once you get used to how powerful STBs are you'll never go back to CTBs again. As we seldom do projects that require more than a few layouts we use code to set up custom properties in each drawing similar to the ones you're using with Sheet Sets. I reference both for projects that require Sheet Sets. Quote
RobDraw Posted July 12, 2019 Posted July 12, 2019 If you make the attribute multiline, a background mask can be applied similar to MText. 1 Quote
ammobake Posted July 17, 2019 Author Posted July 17, 2019 (edited) I've figured out a way to make this work. Rob led me on the right track to figure this out. What I did is first created a multline attdef in my base drawing and applied the background mask by going into the editor. Basically you double click the attdef and click the "..." button next to DEFAULT **this option is only available for multiline attributes. select the text, right click the text and select background mask. I then copied the ATTDEF text to be associated with the new block. I held ctrl+shift+v to paste as a block. You will see a menu pop up with your attributes listed. Click OK. At this point your done and your block will maintain the background mask no matter what. So you might notice with this route, if you double click the attribute to change the text you have to click the "..." first. So in this case it seems faster to change the text over in the properties box because you just have to click 1 button. Whether or not this works with existing block references you might have - No idea on that. it would take some trial and error. There may be a second way to make this work and apply a background mask that would work with single and multiline attribute definitions though. I just haven't tested that method yet. My theory is that by using sheet set manager, you could program a custom block that would import the masked text into an existing single or multline attdef via a field or form field programmed into the custom settings of sheet set manager. But not sure if that would work or not. -ChriS Edited July 17, 2019 by ammobake Quote
ammobake Posted July 17, 2019 Author Posted July 17, 2019 I tested pasting the masked attdef as a custom property within the sheet set manager, like I mentioned yesterday. I can confirm the masking does indeed work and will insert the masked attdef wherever that specific field calls for the text. Pretty neat. -ChriS Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.