billtheia Posted January 18, 2008 Share Posted January 18, 2008 Is there a way to use VectorScript (or another tool) to set all attributes in the attributes palette to "By Class?" I'm not trying to change the attributes of an object, I'm trying to set the default attributes for drawing. Thanks. Quote Link to comment
Pat Stanford Posted January 18, 2008 Share Posted January 18, 2008 SetFPatByClass SetLWByClass SetMakerByClass etc. Check out the VectorScript Function Reference in the VW help. Pat Quote Link to comment
billtheia Posted January 18, 2008 Author Share Posted January 18, 2008 Thanks, Pat but those only appear to work on objects. What I'm looking for is a simple way to reset all settings in the attributes palette to By Class so that the next thing that I draw will use class attributes. Quote Link to comment
brudgers Posted January 18, 2008 Share Posted January 18, 2008 I was hoping that the eye-dropper "pickup sets defaults" would work for this and I'd be a genius for finding a simple answer. But it doesn't. Though maybe it should though. Quote Link to comment
billtheia Posted October 22, 2009 Author Share Posted October 22, 2009 FYI, VW2009 & VW2010 have added the ability to do this. If you click on the little triangle at the bottom of the attributes palette, you'll find several options including "Make All Attributes by Class." See pic. Quote Link to comment
Ozzie Posted October 22, 2009 Share Posted October 22, 2009 Good spot for a tool tip on hover Quote Link to comment
billtheia Posted October 22, 2009 Author Share Posted October 22, 2009 Indeed. I just stumbled onto it. Quote Link to comment
SamIWas Posted October 24, 2009 Share Posted October 24, 2009 (edited) The addition of the item on the attributes pallete is great, but I still can't find whatever Vectorscript function selects Fill or Pen Style. I'm making series of tools containing different text styles, and always want all elements to be by class. I can easily set the colors by class, but not the styles it seems. Everything I've tried, the style always automatically goes to "No Fill" or "Solid"...not "by class". Am I missing something, or is it more obvious and I'm thinking too hard? VW2010 Spotlight w/ Renderworks on Mac OS 10.5.8 Edited October 24, 2009 by SamIWas Quote Link to comment
MullinRJ Posted October 24, 2009 Share Posted October 24, 2009 What about? FPatByClass; LSByClass; Raymond Quote Link to comment
SamIWas Posted October 24, 2009 Share Posted October 24, 2009 LSByClass did work on the Line Style. FPatByClass defines the Fill Pattern, but not the style. It appears that you can call everything by class, EXCEPT Fill Style. I did a search all the way through the Function Reference, and there is no function which effectively sets Fill Style by Class in advance of running a procedure. The way I'm set up is so that I have a Pallet of tools which change all of the text attributes based on what I'm using (Notes, Room Name, etc)...this assigns classes to everything so that they can be colored/filled as required. Unfortunately, it just doesn't seem to work. So I may have to go with a different workaround. Even if I set everything by class in advance, the procedure seems to change it to "No Fill" no matter what. SetTool(-200); TextFont(GetFontID('Arial Narrow')); TextSize(6); TextFace([bold,Italic]); TextSpace(2); TextJust(2); TextVerticalAlign(1); NameClass('Text-Position'); LSByClass; LWByClass; PenColorByClass; FillColorByClass; Oh well. Quote Link to comment
MullinRJ Posted October 25, 2009 Share Posted October 25, 2009 I haven't tried all the tool calls, but FPatByClass works for other tools like the Rectangle and Arc tools, but not for the Text tool. This appears to be a bug. Have you submitted a but report? Raymond Quote Link to comment
SamIWas Posted October 25, 2009 Share Posted October 25, 2009 (edited) OK, I think I found the issue. If the "No Fill Behind Text" option is checked in preferences, the script has no effect on the text fill. The options will work on other objects, but not text. You can still manually change the text fill, just not with the script. One the option is unchecked, the script works perfectly. Honestly, I'm not even sure why that is a preference, since it doesn't seem to do anything in particular. Thanks for the help! Edited October 25, 2009 by SamIWas Quote Link to comment
ccroft Posted October 25, 2009 Share Posted October 25, 2009 Sam, Have you looked into SetPrefInt and SetPrefLongInt? You'll find the index/selector numbers in the appendix. There are selectors for Fill Style and Type. Maybe something like SetPrefLongInt(528,0). I think the second value would be the number corresponding to the place in the drop-down of the style, so maybe by class is zero, or -1 or.... It *seems* this should set the default value in attributes. edit: Or maybe use SetPref(8,False) to make sure that fill behind text is off. Quote Link to comment
MullinRJ Posted October 25, 2009 Share Posted October 25, 2009 To the Moderator(s), ???There was a post between my post (131369) and SamIWas' post (131366). It was posted 22 minutes after 131366, but I don't know whose it was. ???I hit the Reply button at the bottom of 131366 and when I hit Submit, the previous post disappeared. I don't know if the original poster deleted it or if it vanished as a result of the way I replied. Can you tell me if it was removed legitimately? This post is submitted using the Quick Reply pane at the bottom of the page. Thanks, Raymond Quote Link to comment
MullinRJ Posted October 25, 2009 Share Posted October 25, 2009 If the "No Fill Behind Text" option is checked in preferences, the script has no effect on the text fill. Nice find. So, it's not a bug. That preference is an override for fill behind Text objects that predated Class Attributes. It still works as it was originally implemented and I use it all the time. It only affects text as it is created. You can turn it off in your script with: SetPref(8, False); or toggle it with another one line script: SetPref(8, not GetPref(8)); Raymond Quote Link to comment
M5d Posted October 25, 2009 Share Posted October 25, 2009 No need to worry Raymond, I deleted the post when I realised that the details of the scripts I posted were covered throughout the other posts. Quote Link to comment
MullinRJ Posted October 25, 2009 Share Posted October 25, 2009 Oh, good. The timing was such that I though your post was erased accidentally. Quote Link to comment
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.