Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

162 Spectacular

About michaelk

  • Rank
    Vectorworks Addict

Personal Information

  • Occupation
    Lighting Design
  • Homepage
  • Location
    Santa Barbara, CA

Recent Profile Visitors

1,973 profile views
  1. michaelk

    Section lines not displaying in Viewports

    I think what we are seeing is something new in what looks like the same tool in 2019. In 2018, the Section-Elevation Marker Tool in the Dims/Notes tool palette creates a section line or elevation marker for 2D workflows. You can place it anywhere you want and it shows up in viewports in the expected way. You can link it to an actual viewport if you want to enjoy automatic drawing coordination. In 2019 that same tool creates a Section Line object that wants desperately to be linked. So desperately, that it won't show up in a viewport unless it is linked. If you want that old fashioned legacy 2018 section-elevation marker tool experience, you can just ungroup the Section Line object to get the underlying Section-Elevation Marker object that works for 2D workflows.
  2. michaelk

    Section lines not displaying in Viewports

    Interesting… If the Section Line is linked to a Section Viewport (as in a 3D workflow) then it can be set to appear in viewports in the normal way. If you ungroup the Section Line object you get at Section-Elevation Marker object. That behaves like you would expect.
  3. michaelk

    Section lines not displaying in Viewports

    Interesting. If you ungroup the section line it shows up fine. The section line object got smarter in 2019! Now I have to get smarter 😣
  4. michaelk

    Section lines not displaying in Viewports

    Yes. You have everything correct. I'm checking to see if there's something new with section lines in 2019.
  5. michaelk

    Section lines not displaying in Viewports

    If you want to post a drawing here or send it to me in a personal message I'd be happy to take a look at it.
  6. michaelk

    Section lines not displaying in Viewports

    Check to make sure your viewport view is Top/Plan. When that doesn't work try turning on all the classes in the viewport to see if they appear. (That usually works for me😀)
  7. michaelk

    convert vwx to dwg

    Archive 2.zip
  8. I started writing scripts 6 or 7 years ago. In all that time I never realized one of the most common functions for getting a handle to the selected object actually returns the group (if any) that contains the object. Hence the Where's Waldo technique. I wonder what other revelations I'm in for…
  9. OK. With a lot of help from @Pat Stanford & @JBenghiat here is a working version that doesn't get freaked out by an object inside a group. Let me know if there are any more surprises! Procedure EditClassOfSelectedObject; {************************************************* October 29, 2018. Ok. The previous version of the script was horribly done. Even by my standards. This version uses the Waldo technique (thanks Josh and Patrick!) to get the actual handle of the selected object. Even if that object is in a group.} {************************************************* This is a fork of the original script described in the comments below. *************************************************} {Unceremoniously an inelegantly forked by Michael Klaers October 19, 2018} {This script will update the class of the selected object to have the attributes that the object currently has. It will force that class to be Use at Creation and the object will be forced to have all attribues by class} {*********************************************************} {© 2016, Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty or guarantee, expressed or implied. Use at your own risk.} {Test for suitability for your use before using on live data.} {Immediately discontinue use if hair loss occurs.} {December 2, 2016} {This script creates a new class and sets the class attributes to those of the selected} {object. The only parameter that is not set is TextStyle} {Based on a request on the tech board by michaelk, September 21, 2016.} {Updated by Michael Klaers May 8 2017.} {Changes: 1) Newly created class will have "Use At Creation" checked.} { 2) Active class will not change to newly created class.} {Updated by Michael Klaers October 2 2018} {Changes: 3) Selected object will be in the new class, not the active class} {Updated by Michael Klaers October 4 2018} {Changes: 4) Selected object attributes will all be by class} VAR FPat: LONGINT; FillBackR,FillBackG,FillBackB: LONGINT; FillForeR,FillForeG,FillForeB: LONGINT; LineS: LONGINT; LineW: INTEGER; ObjBMarkStyl: LONGINT; ObjBMarkAngle: INTEGER; ObjBMarkSize: REAL; ObjBMarkWidth: REAL; ObjBMarkThickB: INTEGER; ObjBMarkThick: REAL; ObjBMarkVis: BOOLEAN; ObjEMarkStyl: LONGINT; ObjEMarkAngle: INTEGER; ObjEMarkSize: REAL; ObjEMarkWidth: REAL; ObjEMarkThickB: INTEGER; ObjEMarkThick: REAL; ObjEMarkVis: BOOLEAN; POpacity: INTEGER; FOpacity: INTEGER; PenBackR,PenBackG,PenBackB: LONGINT; PenForeR,PenForeG,PenForeB: LONGINT; DSEnabled: BOOLEAN; DSnUnits: INTEGER; DSdOffset: REAL; DSdBlurRadius: REAL; DSdAngle: REAL; DSOpacity: INTEGER; DSRed: INTEGER; DSGreen: INTEGER; DSBlue: INTEGER; ThisObject: HANDLE; SelectedCount: LONGINT; ReturnBool: BOOLEAN; Class2Edit: STRING; SetExistingClass: BOOLEAN; ActiveClassName: STRING; Waldo: HANDLE; BEGIN {*************************** Make sure only one object selected ***************************} ThisObject:=Nil; If NumSObj(ActLayer) =1 then Begin {*************************** Get handle to selected object ***************************} Locus(0,0); Waldo := LNewObj; ThisObject := PrevSObj(Waldo); IF (Waldo <> nil) THEN DelObject(waldo); {*************************** Get all graphic attributes of selected object ***************************} FPat := GetFPat(ThisObject); GetFillBack(ThisObject,FillBackR,FillBackG,FillBackB); GetFillFore(ThisObject,FillForeR,FillForeG,FillForeB); LineS:=GetLSN(ThisObject); LineW:=GetLW(ThisObject); ReturnBool:=GetObjBeginningMarker(ThisObject,ObjBMarkStyl,ObjBMarkAngle,ObjBMarkSize, ObjBMarkWidth,ObjBMarkThickB,ObjBMarkThick, ObjBMarkVis); ReturnBool:=GetObjEndMarker(ThisObject,ObjEMarkStyl,ObjEMarkAngle,ObjEMarksize,ObjEMarkWidth, ObjEMarkThickB,ObjEMarkThick,ObjEMarkVis); ReturnBool:=GetOpacityN(ThisObject,POpacity,FOpacity); GetPenBack(ThisObject,PenBackR,PenBackG,PenBackB); GetPenFore(ThisObject,PenForeR,PenForeG,PenForeB); DSEnabled:=IsDropShadowEnabled(ThisObject); ReturnBool:=GetDropShadowData(ThisObject,DSnUnits,DSdOffset, DSdBlurRadius,DSdAngle,DSOpacity, DSRed,DSGreen,DSBlue); {*************************** Write those attributes to class of selected object ***************************} Class2Edit:=GetClass(ThisObject); SetClFPat(Class2Edit,FPat); SetClFillBack(Class2Edit,FillBackR,FillBackG,FillBackB); SetClFillFore(Class2Edit,FillForeR,FillForeG,FillForeB); SetClLSN(Class2Edit,LineS); SetClLW(Class2Edit,LineW); ReturnBool:=SetClassBeginningMarker(Class2Edit, ObjBMarkStyl,ObjBMarkAngle,ObjBMarkSize, ObjBMarkWidth,ObjBMarkThickB,ObjBMarkThick); ReturnBool:=SetClassEndMarker(Class2Edit, ObjEMarkStyl,ObjEMarkAngle,ObjEMarksize, ObjEMarkWidth,ObjEMarkThickB,ObjEMarkThick); SetClOpacityN(Class2Edit,FOpacity,POpacity); SetClPenBack(Class2Edit,PenBackR,PenBackG,PenBackB); SetClPenFore(Class2Edit,PenForeR,PenForeG,PenForeB); EnableCLDropShadow(Class2Edit,DSEnabled); SetCLDrpShadowData(Class2Edit,DSnUnits,DSdOffset, DSdBlurRadius,DSdAngle,DSOpacity, DSRed,DSGreen,DSBlue); {*************************** Set all attributes of selected object back to By Class ***************************} SetClass(ThisObject,Class2Edit); SetFPatByClass(ThisObject); SetFillColorByClass(ThisObject); SetLSByClass(ThisObject); SetLWByClass(ThisObject); SetMarkerByClass(ThisObject); SetOpacityByClass(ThisObject); SetPenColorByClass(ThisObject); SetTextStyleByClass(ThisObject); End END; Run(EditClassOfSelectedObject); Edit Class Fix.vwx
  10. I just NOW got it working. I'm sure it's not foolproof, but it's working 🤓! Thanks, Gentlemen, for all your help. Again.
  11. Josh I tried that last night. Or at least I thought I was trying that. 😀 I'll give it another run with a clearer head and a bigger workspace than a CRJ tray table.
  12. For a while last night I was trying to do ObjectInQuestion := SelectObj(Sel = TRUE); Wouldn't it be cool if that worked…
  13. Thanks, Josh. Yep. I realize now that I don't need to duplicate the object. I just thought that would be a workaround before learning that I didn't yet have the handle to the selected object. Looks like I need to figure out how to get the handle no matter what the parent object is.
  14. Kevin, keep knocking me in the head until I get it right!


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.