Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

76 Excellent


About MullinRJ

  • Rank
    1000 Club

Personal Information

  • Occupation
    Circuit Board Designer
  • Location
    Dallas, TX

Recent Profile Visitors

1,284 profile views
  1. MullinRJ

    Renaming a field in an existing record format?

    Ryan, I don't think you can do it directly. The best I can suggest is to use a brute force approach. 1) create a new record with the fields of the old record and the one renamed as you like. 2) move default values from the old record to the new. 3) go through the file and attach the new record to any object that has the old record attached. 4) move values from the old attached record to the newly attached record. 5) delete the old record format. This should detach all instances in the file, but if you like, remove the old record after you attach and clone the new one. 6) rename the new record to the old record name with SetName(GetObject('NewRecordName'), 'OldRecordName'). 7) turn this code module into a procedure so you can use it again without a lot of grief. Ideally, if you could get a handle to a record field, you could use SetName() on it, but I don't see that as an option in the VS calls. NOTE: If the record is a PIO record, all bets are off. Also, I have no idea how this will affect any worksheet that references the old record. Since the formulae are text based, it may not matter. As with all complex surgeries, try this on a COPY of your file first! Have fun. If you get it to work let me know. I love it when you get to use a bazooka to swat a fly. 🙂 Raymond
  2. MullinRJ

    Century Gothic Vector issue

    Font Suitcases are pretty old. I would definitely look for a newer version of the font. There seem to be quite a few sites on the web that offer free versions of this typeface. Good Luck, Raymond
  3. MullinRJ

    Century Gothic Vector issue

    Hello Patricia, What kind of font is it; Postscript Type 1, TrueType, OpenType, Scalable Vector Graphics, or (hopefully not) Bitmap? Also, how old is the font file? Perhaps a newer version of the Century Gothic type face would alleviate your problem. Raymond
  4. MullinRJ

    Text is in outline

    Christopher, If you ever do figure out how to do this manually, please post back. I'd love to know how it can be done, too. On either platform, you can set these attributes with a script similar to the one I posted earlier that clears them. e.g., DSelectAll; TextFace( [ Shadow, Outline ] ); { sets the Outline and Shadow text styles } It is also possible to cut and paste text between documents that has one or both TextStyle flags set, but that would not affect the application setting, only the object's. However, the EyeDropper tool has a checkbox that "could" transfer those hidden attributes to be part of the text creation default settings. It's a long shot that you would fall into this rabbit hole, but not impossible. Honestly, I think you did it some other way, but I have no idea at the moment how. Again, please post back if you ever figure out how you got there. All the best, Raymond
  5. MullinRJ

    Text is in outline

    Since I'm getting a bunch of thumbs-up on this last post, I'm posting a copy of the Vectorworks Enhancement (VE) request I entered yesterday. Please feel free to comment on anything I missed. Anything relevant, I'll add it to my request. Thanks, Raymond ———————————————————————————— VE-99490: Make UI consistent on MAC and WIN for Text objects [Raymond Mullin] Description: With a text object selected, the OIP on Windows does not show checkboxes for the Outline or Shadow style attributes. Outline and Shadow are attributes that can be assigned on the Mac, but not on the PC. A problem exists where a text object can have the Outline or Shadow attributes applied on the Mac and then saved. The same file opened on a Windows version of VW will not indicate in the OIP these attributes are assigned, even though they still are. Searches for Plain Text will not find these objects. The Windows platform will attempt to show outlined text, but the user will be confused how to clear this effect since the OIP is missing these two attributes. Solution, the Outline and Shadow attributes should be added to the OIP on Windows. Even if they always remain gray they would indicate when these attributes are set so users can be informed and act accordingly. I assume the Text>Font Style menu on Windows is also missing these two attributes, but I cannot check now. If so, it too should be updated. ADDITIONALLY, the "Plain Text" attribute that is present in the "TEXT>FONT STYLE" menu should be added to the OIP so users can clear all Font Style attributes with one click, including the inaccessible Outline and Shadow settings on Windows versions. This will benefit Windows users more than Mac users, but it will make the OIP consistent with the TEXT menu and across platforms. Please see this recent thread on the Forum that initiated this VE: (>THIS THREAD<) Graphic of UI elements involved. (Christopher, I hope you don't mind me using your OIP screen shot.)
  6. MullinRJ

    Text is in outline

    Thanks @Jim Wilson, One VE coming up (shortly). Raymond
  7. MullinRJ

    Text is in outline

    Hi @Jim Wilson, I think Kevin is referring to the Outline and Shadow options that are available on the Mac but not on the PC. They don't show in the OIP of PC. If a user gets a file that was edited on the Mac, these attributes could be set but wouldn't show in the PC's OIP. This adds a lot of confusion files edited on both platforms. I was planning on writing a VE for this this morning. Would you rather have me enter a bug instead? Raymond
  8. MullinRJ

    Text is in outline

    @Mason2152, You're welcome. Were you able to fix it with the Text Menu, or did you use the script? Just curious. @Kevin McAllister, Without the "Plain Text" checkbox in the OIP, there is no way to clear all TextStyle settings (like the hidden ones on the PC) in the OIP like you can when you use the TEXT menu above. The OIP and the TEXT menu items should be consistent. You can get there from here, but you have to use multiple UI items to do so. Not good. Raymond
  9. MullinRJ

    Text is in outline

    Christopher, The OUTLINE and SHADOW TextStyles are available on the Mac, but not the PC, which is why they don't show in the OIP when you select a text block that has them set. Easy fix - With nothing selected, click on the 'Text > Font Style > Plain Text' menu item. There will be a check mark in front of 'Plain Text' the next time you open the menu. When you see the check mark in front of 'Plain Text', close the file (save if necessary, but not required) and QUIT Vectorworks. This will save this text setting as the default font style when you start a new VW session. If for any reason this doesn't work, then run this short VectorScript and QUIT VW as outlined above. { Set VW TextStyle to PLAIN TEXT (i.e., no formatting). } DSelectAll; TextFace([]); HTH, Raymond
  10. I am. Please send the file to the address above. Raymond
  11. Tui, I just tried your function in VW 2017 and both versions (with descend=TRUE and descend=FALSE) convert the contents of the group to the new class. vs.SetClass(), when used with a GROUP handle always changes the container and all its contents to the new class name. Have you seen it do differently, and if so, where? Thanks, Raymond
  12. GioPet, The only way I know of that Layer(), or vs.Layer(), will create another numbered layer is if the name passed to the Layer() procedure is an empty string ( i.e., vs.Layer("") ) and that would occur if the handle variable 'item' is NIL. You should put a trap in your routine to test for 'item' being NIL. Here's one way, albeit an overly simple one. for item in ExtendedGroups: if (item != vs.Handle()): layHand = vs.GetLayer(item) layName = vs.GetLName(layHand) vs.Layer(layName) vs.SetSelect(item) vs.Ungroup() vs.NameClass(TargetClass) vs.Group() vs.DSelectAll() else: vs.AlrtDialog("item == NIL") Raymond
  13. GioPet, I am not sure how you got that code snippet to run, but the first line is not syntactically correct. layerName: 'Design Layer-1'; should read: layerName := 'Design Layer-1'; When your variable "layerName" has the value 'Design Layer-1', it will not create 'Design Layer-2' and it will either make 'Design Layer-1' active, or leave it active. BUT, if "layerName" has the empty string value '', it will create 'Design Layer-2'. My guess is that your variable "layerName" is uninitialized when you pass it to the LAYER() procedure. HTH, Raymond PS - be careful copying code from Safari (my browser), and potentially other browsers, so that you don't introduce INVISIBLE characters to your code. When I copied your two line example, and then copied pieces of it to embellish my answeer, I introduced about a dozen copies of unicode character 0xFEFF. This character is invisible, unless you know how to look for it. Always filter your code through a word processor that can show INVISIBLE characters.
  14. MullinRJ

    Easy Text with color SOLVED!!

    Correct. The first approach we discussed ignores the VW Preference entirely and forces a Fill Color and Pattern after the text is created. The second approach changes the preference to allow the current document Fill attribute to be applied when the text is created, then restores the preference to its original state. So either way you go, that VW Preference remains unchanged after the script has run. Raymond
  15. MullinRJ

    Easy Text with color SOLVED!!

    Hi @avictorgm , when I wrote my earlier replies, I was not at my best. I completely forgot about the VW Preference "Create text without fill". The Python call "vs.CreateText()" will create text with the document fill color and pattern IF the "Create text without fill" PREF is disabled, but if the preference is set, then the text background fill color and pattern are ignored, as if the document fill pattern were set to NONE. So, you could do as I suggested above, and force the fill after creating the text, OR, you could toggle the preference OFF before creating your text, and restore its setting after your text is created. Something like this: CreateTextWOFillPref = vs.GetPref(8) # save pref setting (boolean) vs.SetPref(8, False) # disable pref setting vs.CreateText(str("Motor ") + str(X1) + str(", ") + str(Y1)) vs.SetPref(8, CreateTextWOFillPref) # restore pref setting This code snippet will create TEXT using the document fill color and pattern and ignore the VW preference to "Create text without fill". If your code is working as you like it, there is absolutely no need to change anything. I am just trying to provide a more comprehensive answer. All the best, Raymond


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.