Jump to content

The Hamma

  • Posts

  • Joined

  • Last visited


89 Excellent


Personal Information

  • Occupation
  • Location
    United States

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I figured out that I can increase the number of facets in an STL export using the ExportSTL command. Per the command the percent of tessellation resolution should be a Real number between 0 and 100 but you can increase that number above 100 to increase the tenssellation. FUNCTION ExportSTL ( filePath:DYNARRAY[] of CHAR; exportBinary:BOOLEAN; percentTess:REAL; exportObjectsOptions:INTEGER) :BOOLEAN ; percentTess = tessellation resolution -- from 0 to 100 0 -- low, 100 --high
  2. Great suggestion, but not quite what I am lookin for, I wish that tool had a hidden line render option.
  3. Find it here https://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix_F or the root https://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix
  4. I wish there was a way to permanently lock in the viewport cache of a viewport. Many times we have interior elevations that once they are created and edited they will not change and if they do we are aware that we are editing them. The issue is that it takes a long time to regenerate all of the interor elevation viewports which are not changing. Sometimes the link is broken and we have to recreate it. It would be great if there were a switch to permanently lock the viewport cache even after a crash so that the viewports have no need to update unless the lock is swiched off.
  5. Nevermind, I was informed Synology does have an answer.
  6. Please remove the period from the beginning of the lock file name. This period causes the file not to sync with synology cloud stations and theirfore we are unable to determine if a remote user has a file open.
  7. I edited it to also select unstyled versions. I also added Spaces, Comm Devices, and Receptacles PROCEDURE SelectMatch; VAR h : HANDLE; piotypeis, layernameis, stylenameis : STRING; PROCEDURE GetStyleName(h :HANDLE); BEGIN stylenameis := GetPluginStyle(h); piotypeis := GetObjectVariableString(h, 1166); END; BEGIN layernameis := GetLName(ActLayer); ForEachObject (GetStyleName,(NOTINDLVP & NOTINREFDLVP & ((L=layernameis) & (SEL=TRUE) & ((PON='Door') | (PON='Window') | (PON='Space') | (PON='Comm Device') | (PON='Receptacle'))))); SelectObj((((PON=piotypeis) & (PST=stylenameis) & (L=layernameis)))); END; Run(SelectMatch);
  8. PROCEDURE SelectMatch; VAR h : HANDLE; layernameis, stylenameis : STRING; PROCEDURE GetStyleName(h :HANDLE); BEGIN stylenameis := GetPluginStyle(h); END; BEGIN layernameis := GetLName(ActLayer); ForEachObject (GetStyleName,(((L=layernameis) & (SEL=TRUE) & ((PON='Door') | (PON='Window'))))); if stylenameis <> '' THEN SelectObj((((V) & (PST=stylenameis)))); END; Run(SelectMatch); To use select one door or window and run script.
  9. I wrote a script to renumber viewports but I get a warning that the number has been used before. If Drawing coordination is turned off they no warning is displayed. So I tried to turn it off in the script and turn it back on at the end but it still gives the warning. Test file attached. {Script Name: VP Label (Consecutive) This script will renumber drawing labels contained within VP annotations in order picked by mouse. David Hamer, 2022 revision 11/7/2022} PROCEDURE NumberVPConsecutive; VAR numberStr : STRING; h,h2, anno, h1 : HANDLE; pX,pY : REAL; doorNumber,dummyVar,vpNumber : INTEGER; zoomis:LONGINT; DCPref:BOOLEAN; PROCEDURE SetVPNumber; BEGIN GetPt(pX,pY); if GetTypeN(h) = 122 THEN BEGIN {if h is a viewport} anno := GetVPGroup(h, 2); {creates group from annotations of selected viewport} h1 := FInGroup(anno); {selects the first object in the anno group} while h1 <> NIL DO BEGIN { steps through every object in the viewport selected by the click} if GetObjectVariableString(h1, 1166) = 'Drawing Label' THEN BEGIN {if veiwport object is a drawing label} SetRField(h1,'Drawing Label2','Drawing',numberStr); {VW 2021 Version sets the drawing label to the current active number in sequence} vpNumber := Str2Num(numberStr); { convert number string to number.} numberStr := Num2Str(0, vpNumber + 1); {subtract number from sequence then convert number to string.} ResetObject(h1); END; h1 := NextObj(h1); {get next object in viewport\} END; ResetObject(h); END; END; BEGIN DCPref := GetPref(544);{get status of drawing coordination} SetPref(544,FALSE);{turn off drawing coordination} ReDrawAll; {•••• Ask for starting number ••••} numberStr := StrDialog('Enter and INTEGER to start numbering:','1'); Message('Click in empty space to end numbering'); SetVPNumber; {•••• Repeat process until there is NO object at the clicked location ••••} WHILE GetPickObjectInfo(pX,pY,h,h2,dummyVar) DO BEGIN SetVPNumber; END; ClrMessage; {ReDrawAll;} SetPref(544,DCPref);{set drawing coordination to original state} zoomis:=GetZoom; SetZoom(101); Setzoom(zoomis); END; RUN(NumberVPConsecutive); vp renumber.vwx
  10. This is how it works: import vs; def DoIt(h1): vs.AlrtDialog( "we're in", h1 ) def PickPointCallback(pt): vs.ForEachObjectAtPoint(DoIt, 0, 0, pt[0], pt[1], 5) vs.AlrtDialog( "show let you pick a point, and then show a dialog with the object's handle" ) vs.GetPt( PickPointCallback ) You need to add your function to the (PickPointCallback) definition part of the script to evaluate pt[0] and pt[1]
  11. Does anyone know a vectorscript command to report the scale of a viewport?
  12. Funny thing is both scripts work if the interal shape is a polyline but it does not work if it is a Polygon. See attached file. Flip Extrude Profile.vwx
  13. Thanks, I just came to same conculsion after I got this script to work minus the refreshing issue. def FlipIt(h): h1= vs.FIn3D(h) if vs.GetTypeN(h1)==24: h2 =vs.FIn3D(h1) if vs.GetTypeN(h2) == 21: if vs.Random() >= .5: vs.Mirror(h2,False, (0,0), (5,0)) vs.ResetObject(h1) vs.ResetObject(h) vs.ForEachObjectInLayer(FlipIt,2,2,0)
  • Create New...