Jump to content

JBenghiat

Member
  • Posts

    2,036
  • Joined

  • Last visited

Reputation

893 Spectacular

Personal Information

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

Recent Profile Visitors

10,756 profile views
  1. None of the other association constants are documented. They are called in DebugListView, so you can see if seemingly connected objects have an association, and the constant is usually named.
  2. There is not currently a tool for this. A number of solutions exist for creating/duplicating around an arc, but not for distributing existing objects. My solution has been to use the lighting pipe's tick marks. In the case of a truss, I insert a Lighting Pipe along a chord and turn off the "Draw pipe" option, which leaves only the tick marks. I have a script which distributes along an arc, but last I checked a bug in VW made it crash when picking the center point.
  3. Tools created with VS/Python have a lot of limitations — most of the complex tools you see require the SDK. The easiest way to have a tool with options is to call RunTempTool from a menu command: https://developer.vectorworks.net/index.php?title=VS:RunTempTool You CAN create an event-enabled tool, though the process requires a byte editor, so not very user-friendly: https://developer.vectorworks.net/index.php?title=VS:vstGetEventInfo. The event loop is almost identical to RunTempTool.
  4. @Stefan B. You seem to be describing a plug-in object. You create the object via the Plug-in Manager, and insert via a tool (the object automatically generates an insertion tool) rather than the Resource Manager. PIOs can be point-based, which function very similar to symbols.
  5. I think you found it. You would then add items to the menu
  6. It puts the data into a notes field — so you can report on position name and note, but the latter is a single piece of data. It’s not as data-connected as Truss Tags.
  7. If you're looking for a notation on the drawing, Savvy Position Label will give you totals and counts in a note, can can work with Hanging Positions, as well as directly with Truss systems and lines. It does not currently provide data for a worksheet, though. https://benghiatlighting.com/software/support/user-guides/savvy-position-label-4-user-guide/#objectparameters
  8. How are you generating this list? If it’s a worksheet, you can right-click on a row and choose the “select” option. You can also use Tools>Custom Selection to select by field value.
  9. Are you displaying as text? The easiest thing is to set your units setting the way you want your dimension string to be represented. You could also iterate through the text string from the back and remove any zeros. If this is a number, try multiplying by 10000, rounding, then dividing by 10000
  10. And if you really wanted to automate things, you would have a list of stock sizes and a constant representing the maximum angle between segments. You would try successively smaller chord lengths from your list until you either were under your angle tolerance or reached the end of the list.
  11. Vectorworks doesn’t have this intersection function in its API. To truly solve this mathematically, you would need to use the control points and arc types of each polyline segment, then intersect with a circle, but that is probably overkill. I can think of two solutions: Use PointAlongPoly(). The length will be >= your chord length, so start with that as an initial value, and increase your length by 1mm until the distance from the start point to the end point >= your chord length. For subsequent points, set your start point to the found point, and the start length to the found length + chord length. Call Polygonize() on the original polyline with a segment length of 1mm, then iterate over the new polygon’s points, developing a list of start and and points whose distance equals your chord length. I believe this is essentially what pointalongpoly is doing under the hood. Obviously, you can change 1mm to wherever your tolerance is.
  12. To create a VP, call CreateVP() and use object variables to set as section: https://developer.vectorworks.net/index.php?title=VS:CreateVP https://developer.vectorworks.net/index.php?title=VS:Function_Reference_Appendix_G#Viewports However, creating a section VP via VS doesn't seem possible // 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/write const short ovViewportAttachDefaultRenderOptions = 1057; // Boolean(ignored) write const short ovViewportAttachDefaultCustomRenderWorksRenderOptions = 1058; // Boolean(ignored) write const short ovViewportDisplay2DComponents = 1059; // Boolean read/write const short ovViewportHiddenLineDisplay2DFills = 1060; // Boolean read/write const short ovViewportAttachDefaultLightingOptions = 1061; // void write const short ovViewportCreateDefaultEditableGroups = 1062; // void write const short ovViewportPrivateLayer = 1063; // MCObjectHandle read const short ovSectionViewportDisplayObjectsBeyondCutPlane = 1064; // Boolean read/write const short ovSectionViewportDisplayObjectsBeforeCutPlane = 1065; // Boolean read/write const short ovViewportHiddenLineDisplay2DFillsAllowed = 1066; // Boolean read const short ovSectionViewportCastShadowsFromRemovedPortion = 1077; // Boolean read/write const short ovSectionViewport2DResultsMerged = 1078; // Boolean read/write const short ovSectionViewport2DAttributesUseClass = 1079; // Boolean read/write - must be set true before you set class with ovSectionViewport2DAttributesClass const short ovSectionViewport2DAttributesClass = 1080; // RefNumber read/write const short ovSectionViewport2DOtherAttribsUseClass = 1081; // Boolean read/write - must be set true before you set class with ovSectionViewport2DOtherAttribsClass const short ovSectionViewport2DOtherAttribsClass = 1082; // RefNumber read/write
  13. Is there a custom user origin? I can't remember off the top of my head, but a number of functions always use the internal origin. You need to get the user origin and offer your coordinates by that amount. You may also have to take rotated plan into account.
  14. You could always create a new pop-up parameter in Spotlight Preferences. If you wanted data to auto-enter from the symbol, attach a custom record to the symbol definition, add a field matching the name of your user field, and add the record via Additional Default Records in Spotlight Preferences.
  15. Vectorworks has never had this feature. Are you thinking of the Autoplot Rotate Each commands?
×
×
  • Create New...