Jump to content

Pat Stanford

  • Posts

  • Joined

  • Last visited

Everything posted by Pat Stanford

  1. Try this. There may be some very slight bias toward either positive or negative, but it seems to do OK. Procedure RotateRandomEachObject; {Updated May 27, 2022 to do positive and negative rotation.} {Rotates each selected object in the active layer a random amount <20°} {Works on selected objects in a layer, symbol definition, or group} {Symbols and PIOs are rotated around the insertion point} {Other Objects are rotated around their center point} {© 2007,2008,2010 Coviana, Inc - Pat Stanford pat@coviana.com} {© 2017 Pat Stanford pat@coviana.com} {© 2022 Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No Warranty Expressed or Implied. Do no operate motor vehicles} {while using this script.Side effects include baldness and acne.} Var X1,Y1,R1 :Real; Procedure WithIt(Hd:Handle); Begin If ((GetType(Hd) = 15) or (GetType(Hd)=86)) then GetSymLoc(Hd,X1,Y1) else HCenter(Hd,X1,Y1); IF Random>=0.501 Then R1:=1 Else R1:=-1; HRotate(Hd,X1,Y1,(20*Random*R1)); End; Begin ForEachObject(WithIt,((InSymbol & VSEL=TRUE))); End; Run(RotateRandomEachObject);
  2. GetObjectVariableBoolean(Handle, 6); is the key you need to unlock this problem. Not available except through a script. Script and Visualization both in the attached file. Procedure MarkOverriddenDims; {May 27, 2022} {©2022 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No Warranty Expressed of Implied. Use at your own risk.} {Object Variable 6 indicates if a Dimension has the Show Dim Value} {Check box checked. If true it means that the dim value is showing} {False means it is not showing.} {This script runs looks at every Dim in the document and deletes a Record} {from those that have Show Dim Value checked and adds the Record} {to those that have it unchecked.} {If you don't ResetObject on each Dim, a Data Visualization} {will not see the correct Record attached/detached value.} Procedure Execute(Hd1:Handle); BEGIN If GetObjectVariableBoolean(Hd1,6) Then DelRecord(Hd1,'OverriddenDim') Else Record(Hd1,'OverriddenDim'); ResetObject(Hd1); End; BEGIN ForEachObject(Execute, (INSYMBOL & INOBJECT & INVIEWPORT & (T=DIMENSION))); End; Run(MarkOverriddenDims); Mark OverriddenDims.vwx
  3. I don't think the cable report is actually a "worksheet" in that it can be modified and reformatted. For custom reports, VW has added a Worksheet Function called DatabaseByScript. Effectively, this lets a programmer write a script that picks every object that will show up in the database and the order they show up and then use the Worksheet to specify the columns. But if you use/need this functionality, it becomes much harder for the user to make modifications. I will leave it to the ConnectCAD team to let us know if I am correct or to let you know how to do what you want.
  4. Since database subrows are dynamic, there is no way to directly access the data from a subrow cell. In any way, in the local worksheet or a referenced one. By dynamic I mean that because cells can be sorted and SUMmarized in different ways, it is very difficult to guarantee that cell A4.1 will always have the value you want in it. If someone adds another object to the drawing the sorts above the current 4.1, it will be added and now what was 4.1 is now 4.2 or something else. And there is not good algorithm to be able to figure out what the user actually wanted. Another example. You have data SUMmarized and cell 4.1 is the sum of 3 different objects. Someone turns off the SUM. How would your cell reference know that and what should it do as a result? For some functions you may be able to use a spreadsheet version and specify the criteria you need to get the same value. Or for some options you may need to go to a worksheet script that can get the correct data. Take a look at this thread for an example I recently did.
  5. I don't know about the SDK, but in Vectorscript the command to place a PIO is CreateCustomObject (Or ...ObjectN, or ...ObjectPath options.). You pass the name of the PIO you want to insert and the location/rotation.
  6. take a look at this thread. it implies that DLVPs are in Fundamentals. Maybe you have the referencing mode set to Layer Import.
  7. You have to pull the data onto a Design Layer. You can then use that Design Layer Viewport as part of a Sheet Layer Viewport.
  8. Go to the Create Viewport menu command. Set it to Create on a Design Layer. That should unlock the Source button which will allow you to pick the file you want to reference the data from.
  9. @Sam Jones Sorry Sam, I couldn't help my self. 😉 @Stoli I agree, buy Sam's tools. But here is another way. Use the regular Chain Dimension tool and then with the chain dims still selected run the following script. It will collapse all the Dims to the same "vertical" direction and move the Dim Text to the end point of the dimension. Seems to work OK on horizontal dims. If you want to go this way it will need more work to handle vertical and angled dims. Buy Sam's tools. 😉 Procedure ChainDimPoints; {May 26, 2022} {©2022 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No Warranty Expressed of Implied. Use at your own risk.} VAR H1 :Handle; X1, Y1,R1 :Real; Procedure Execute(Hd1:Handle); BEGIN R1:=HLength(Hd1); SetObjectVariableBoolean(Hd1,29, False); SetObjectVariableReal(Hd1, 44, 1); SetObjectVariableReal(Hd1, 45, R1); ResetObject(Hd1); End; BEGIN If GetTypeN(FSActLayer)= 63 THEN Begin R1:=GetObjectVariableReal(FSActLayer,45); ForEachObject(Execute, (((T=DIMENSION) & (VSEL=TRUE)))); End Else AlrtDialog('Only Dims can be selected'); End; Run(ChainDimPoints);
  10. Thank you @Jesse Cogswell I was resetting the value of 44 before I was checking what the value was. 😞 Thank you for the help.
  11. As of VW2021, Fundamentals is shown as having the ability to edit referenced design layer viewports. I have not found the W2022 chart yet. https://app-help.vectorworks.net/2021/eng/Commands_Tools2021.pdf
  12. We can make this work a couple of ways: 1. I can attach a record to Dims with Show Dim Value unchecked. Then you can use Visualization to set them as you need. 2. I can Change the Class or Attributes of these Dimensions 3. I can Deselect everything and then select only the Dims with Show Dim Values unchecked. What will work better for your workflow?
  13. Delete, draw a new rectangle, Convert to Nurbs?
  14. Do any of you have a way of getting the "horizontal" offset of the dimension text along a linear dimension? ObjectVariableReal of 44 from the appendix seem like it should be what I need, but it always returns zero. I want to uncheck the Autoposition dimension (ObjVar 29 I believe) and then move the dim text to the "far" end of the dimension. But I can't find the right way to do it. Thanks.
  15. @GuyPCIt is better to start your own thread than to add to a year old thread that is very different. While your symptoms may sound similar you are using a different version of VW on a different operating system on different hardware. It is unlikely to be the same cause. I recommend you start with these steps to try and solve the problem. 1. Reset your preferences. Go to Vectorworks Preferences and click the Reset button in the bottom left. 2. Rename/move your user folder and restart VW to create a new one. 3. Manually clear everything VW related from Library:Preference 4. Unistall and reinstall VW There have also been some issued with Automatic Graphics Switching, but I am not certain if that is an M1 problem or not. But probably worth a try to see. System Preferences:Battery Uncheck Automatic Graphic Swtiching in both the Battery and Power Supply panes. This should probably have been right after resetting preferences. HTH
  16. What about using the Contrained Baseline Mode, selecting the first ("lowest") dim, copying the Dim Offset from the OIP. Select All of the dims and paste the Dim Offset into the OIP field. That should "collapse" all of the dims to be on top of each other. Then you only have to move the dim text to where you want it.
  17. You can reference cells in other worksheets by using the worksheet name as part of the function: Working in a worksheet named 'Worksheet-A' and entering a cell formula of ='Worksheet-1':A4 will reference the value from a different worksheet named 'Worksheet-1' The values in Worksheet-A will update when it is recalculated to the then current values in Worksheet-1. HTH
  18. Or double clicking on the symbol instead of dragging it? The double click will activate the symbol insertion tool and make the symbol the current default.
  19. The script part is easy: SetPref(14, Not GetPref(14)); Copy the above. Go to Tools:Plug-ins:Plug-in Manager. Choose the Custom Plug-ins tab and click the New Button. Set it to be a Command type plug-in and name it as you want it to display in your menus. Click OK. Click the Edit Script button and paste the above line into the script editor. Make sure it is set to Vectorscript. Click OK until you exit the Plug-in Manager. Edit your workspace to add the command you just made to a menu and add a keyboard shortcut. Ask if you need more help.
  20. It should not be OS compatibility as 2019 is compatible with 10.15. The next step(s) I would suggest are: 1. Go to System Preferences. In OS11 it is the Battery control panel. In 10.15 it might be something like Power or Display and turn off Automatic Graphics switching for both battery and power supply. The laptop could be getting confused about what graphics card to use. 2. Quit VW. Go to your user folder and rename the 2019 user folder or move it somewhere else, maybe your desktop. When you restart VW a new user folder will be recreated. Start VW and see if that solves the problem. You will have to reenter your user id, so make sure you have it. 3. Quit VW. Go to Library:Preferences and remove everything that has a name containing Vectorworks or Nemetschek and ending in .plist. Start VW and see if this solves the problem. 4. I don't remember if VW2019 shipped with an uninstall app or not. If so, then run that and tell it to do a full uninstall and then reinstall vw. HTH
  21. Interesting you bring this up. We just had a conversation about this yesterday in the moderators thread. We are seeing it also. It appears to be a problem in the in the forum software. This is provided by an outside company. They have had other sites report the problem also. I have no workaround other than the one you described about deleting one of the files or images. When you get a double paste are they both jpg? Or a jpg and a png? I have no idea when there will be a fix for this.
  22. I think you need to "Wrap" the marionette network to make it a single node and then Convert to Object Node. Those two steps effectively make a PIO from the Marionette network. The node will disappear and be replaced by the object that the node draws. The reset script will then trigger a reset on that object. You can right click on the Object Node and choose Edit Script to be able to see and change the network. When you exit the edit mode the created object will reappear using the changes to the network. I hope this makes sense.
  23. You are right. We are in the wishlist. Sorry about that. This thread should be enough on this topic for now.
  24. Thank you Sam. I knew I was forgetting at least one.
  • Create New...