Jump to content

JBenghiat

Member
  • Content Count

    1,335
  • Joined

  • Last visited

Community Reputation

305 Spectacular

About JBenghiat

  • Rank
    1000 Club

Personal Information

  • Homepage
    https://www.benghiatlighting.com
  • Location
    United States

Recent Profile Visitors

4,156 profile views
  1. To answer your original question, you had a ")" after "BOOLEAN" instead of a semicolon, which caused your BEGIN/RUN error. It looks like you fixed that. If you're just getting started, you may want to look at using python instead of Vectorscript. The API is identical, but you have the added benefit of a modern and non-proprietary coding language, with many built-in modules, as well as the ability to install external modules.
  2. You also need to take into account the PIO’s rotation. RelativeCoords can help with that. Also, make sure to keep straight whether you’re translating the external point to the plug-in space or the other way around.
  3. I think you want range(NumRecords)
  4. I think the problem is with TextSpace(0). This sets the line spacing to 0, so all the lines will lay on top of each other.
  5. outputFolder is the magic variable that holds the path to the installed location. This is usually the user plug-ins folder, though using this variable would catch installing into a workgroup folder.
  6. The script must be named install.py The script must be at the root level of the zip folder. If it is inside an enclosing folder, it will not run. This could present an issue if a user unzips the install package and then tries to re-zip. In 2018 SP1 and up, you can work around this by changing the zip extension to .vwlibrary
  7. Is this for 2021? If so, see here: https://www.mckernon.com/supportmenu/vwdataexchangevwbugs2021.html
  8. Just a guess, but try setting the parent wall to selected as well. Looking at the selection status in Debug List View, container objects are always flagged as selected when their children are selected.
  9. You pass the handle of the sheet layer to the CreateVP command. Then iterate through the layers in the drawing, and use SetVPLayerVisibility() to set the layers to invisible, except for your desired layer. I also imagine that the command works similarly to the menu in that the current view options is the basis for the viewport.
  10. Oh, and don't confuse mil with mm. A mil is a thousandth of an inch. You can switch line weight units by choosing a custom line weight. The menu then will use that setting. Use whatever line weight units makes the most sense to you.
  11. I don't think you will find a single answer — the choice is subjective, and finding the weights that work for your eye is part of the task of the designer. You will also find that line weights are not a 1:1 relationship to hand drafting. CAD lets you control line weight with much more precision, and you have have at least five or six distinct line weights in your drawing, along with the ability to give the pen less than 100% gray. Remember, you are not confined to the line weights listed in the dropdown menu. All these options allow you to create a more clear visual hierarchy to your drafting. You may also find that having a slightly different set of line weights for quarter-inch and half-inch scales is advantageous. Also, the affect of line wights can vary from printer to printer, with ink-based printers and plotters having slightly more substantial lines than xerographic-based plotters. I also strongly recommend setting up a class system that sets attributes by class and uses descriptive terms instead of "thick," "thin," etc. You want to make the drawing process as creative as possible, and that means thinking the least about technicalities. For example, "Lighting-Symbol-Outline" and "Lighting-Symbol-Detail" eliminate the need to remember if you intend to set the line weight to medium or thick. Be smart but lazy. That said, some rough guidelines for mm: 1mm is very thick — reserved for drawing borders, etc. .7-.45 is thick .35-.15 is medium .05 -.02 is the thinnest
  12. The hardest thing with DoMenuText is probably getting the handle to the new viewport. You have the most control with custom dialogs and the CreateVP command. Viewport object variables below // Viewport type selectors // -------------- const short ovViewportProjectionType = 1000; // short read/write - the viewport projection type. - Public for VS const short ovViewportRenderType = 1001; // short read/write - the viewport render type. - Public for VS const short ovViewportPerspectiveDistance = 1002; // real read/write - the viewport perspective distance (used with custom perspective). - Public for VS const short ovViewportScale = 1003; // real read/write - the viewport scale. - Public for VS const short ovViewportDirty = 1004; // Boolean read/write - the viewport out-of-date (dirty) state. - Public for VS const short ovViewportProject2D = 1005; // Boolean read/write - the viewport project 2D state. - Public for VS const short ovViewportRenderBackground = 1006; // Sint32 read/write - the viewport render background. - Public for VS const short ovViewportViewType = 1007; // short read/write - the viewport view type. - Public for VS const short ovViewportLineWeightScale = 1008; // double read/write - the viewport line weight scale. - Public for VS const short ovViewportArrowheadScale = 1009; // double read/write - the viewport arrowhead scale. - Public for VS const short ovViewportDashedLineScale = 1010; // double read/write - the viewport dashed line length/spacing scale. - Public for VS const short ovViewportHatchLineScale = 1011; // double read/write - the viewport hatch line spacing scale. - Public for VS const short ovViewportDesignTextScale = 1012; // double read/write - the viewport design layer referenced text size scale. - Public for VS const short ovViewportSlashThicknessScale = 1013; // double read/write - the viewport slash thcikness scale. - Public for VS const short ovViewportAmbientIsOn = 1014; // Boolean read/write - the viewport ambient light is ON or OFF. - Public for VS const short ovViewportAmbientBrightness = 1015; // double read/write - the viewport ambient light brightness. - Public for VS const short ovViewportAmbientColor = 1016; // WorldPt3 read/write - the viewport ambient light color. - Public for VS const short ovSetDesignLayerVisibilityInAllViewports = 1017; // short, -1 = invisible, 0 = normal, 2 = grayed - Public for VS const short ovSetClassVisibilityInAllViewports = 1018; // short, -1 = invisible, 0 = normal, 2 = grayed - Public for VS const short ovViewportHDRIBackground = 1019; // Sint32 read only - the background for environment lighting - Public for VS const short ovSectionVP2DAttributeClass = 1020; // Sint32 read only - the RefNumber of the class responsible for attributes of overall cross-section or just the x-section of structural elements. - Public for VS const short ovSectionVP2DOtherAttribClass = 1021; // Sint32 read only - the RefNumber of the class responsible for attributes of cross-section generated from non-structural elements - Public for VS const short ovSectionVP3DFillStyleClass = 1022; // Sint32 read only - the RefNumber of the class reposnsible for fill style of the objects beyond section plane - Public for VS const short ovSectionVP3DLineStyleClass = 1023; // Sint32 read only - the RefNumber of the class responsible for line style of the objects beyond section plane - Public for VS const short ovViewportXPosition = 1024; // double read only - the X coordinate of the viewport on the sheet layer - Public for VS const short ovViewportYPosition = 1025; // double read only - the Y coordinate of the viewport on the sheet layer - Public for VS const short ovViewportAngleWithXAxis = 1026; // double read only - the angle that the viewport subtends with the X axis on the sheet layer in degrees - Public for VS const short ovViewportShowWallComponents_OBSOLETE = 1027; const short ovViewportGrayTransparent = 1028; // Boolean read/write - the viewport renders gray layers transparent - Public for VS const short ovViewportFlipText = 1029; // Boolean read/write - the viewport/dlvp adjusts for flipped text - Public for VS const short ovViewportBlackAndWhite = 1030; // Boolean read/write - the viewport/dlvp draws in black and white only - Public for VS const short ovViewportUseDocumentClassVis = 1031; // Boolean read/write - set/reads the Use Document Class visibilities settings for dlvps - Public for VS const short ovViewportDescription = 1032; // TXString read/write - a description for the viewport, which corresponds to the Dwg Title field for a corresponding Drawing Label. - Public for VS const short ovViewportLocator = 1033; // TXString read/write - the locator for the viewport, which corresponds to the Item field for a corresponding Drawing Label. - Public for VS const short ovViewportIsLinked = 1034; // Boolean read - indicates whether the viewport is a linked viewport const short ovViewportDisplayPlanar = 1035; // Boolean read/write - the flag to indicate if planar and 2D objects are to be displayed const short ovViewportForegroundRenderType = 1036; // short read/write - the viewport render type. - Public for VS const short ovViewportHasCamera = 1037; // Boolean read only - whether there is a camera attached to the viewport or not const short ovCameraAttachedToViewport = 1038; // Boolean read only - whether the camera is attached to a viewport or not const short ovViewportCropVisible = 1039; // Boolean read/write - get/set the Crop Visible state of a viewport - Public for VS const short ovViewportLayerHeightIgnored = 1040; // Boolean read only - whether the viewport ignored layer height for single layer case const short ovViewportLightingDevice = 1041; // read/write - make an association between a lighting device light and an overriden light object for the viewport. const short ovViewportRePositionDimensionText = 1042; // Boolean read/write - the viewport/dlvp re-positions dimension text to other side of dimension line - Public for VS const short ovIsDesignLayerSectionViewport = 1043; // Boolean read only - indicates whether the linked viewport is a sheet layer or a design layer viewport - Public fo VS const short ovFDLSVPHiddenLineInWireframe_OBSOLETE = 1044; const short ovViewportPageSymbolScale = 1045; // double read/write - the viewport page symbol scale. - Public for VS const short ovViewportNavigateToFromSectMarker = 1046; // Boolean write only - selects the viewport and makes it visible - Not for public use const short ovViewportDetailLevel = 1047; // short read/write - low detail = 0, medium detail = 1, high detail = 2 - Public for VS const short ovViewportIsHorizontalSection = 1048; // Boolean read - indicates whether the viewport is horizontal section const short ovViewportTransformMatrix = 1049; // TransformMatrix read/write const short ovViewportViewMatrix = 1050; // TransformMatrix read/write const short ovViewportOperatingTransform = 1051; // TransformMatrix read const short ovViewportUnscaledBoundsWithoutAnnotations = 1052; // WorldRect read const short ovViewportResetForOnlyAnnotationsChange = 1053; // void write const short ovIsSectionViewport = 1054; // Boolean read only - indicates whether the viewport is a section viewport - Public for VS const short ovSheetLayerSectionViewportViewMatrix = 1055; // TransformMatrix read const short ovSectionViewportSectionViewMatrix = 1056; // TransformMatrix read
  13. Using ForEachObjectInList() instead of iterating with NextObj() is the easiest method (choosing the descend into groups option). Otherwise, make your while statement into a function. At the top of the function, check if the type of H1 is a symbol folder, and if so, call the function (recursively) on FInGroup(H1). Otherwise, process the symbol.
  14. @Sam Jones I assume that you want to set the page area in the drawing — the equivalent of going to File>Page Setup and setting the printable area. This should NOT be a function of the OS print system, as the printer does not necessarily need to match the print area (VW will tile or crop as needed). If you want to actually set a custom page size, the equivalent of pressing Printer Setup… in the Page Setup dialog, then you would need to work with OS settings. Untested, but there is access to set the print area to a single page: const short ovLayerRepaginate = 156; // Public for VS // ovLayerRepaginate (Boolean) // Set() causes the pagination to be recalculated for the given Sheet Layer or Design Layer (useful after manipulating the PrintInfo). // true = set drawing size to one page, false = divide drawing size into multiple pages; // Get() determines how the drawing is currently paginated // true = one page, false = multiple pages
  15. ResetObject(), just like a drawing object.

 

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.

×
×
  • Create New...