Jump to content

PatW

Member
  • Posts

    60
  • Joined

Everything posted by PatW

  1. have you tried importing it withgout the .py ending:
  2. I used to create a "update" script in the resource palette for this. Import all modules that should be updated within there and execute it when changes have been made before running the real script.
  3. It means apply rotation before applying the offset. Addition: Rotations use always the 0,0,0 as anchor. Whne you want to rotate some object about his own axis you would have to move it first with the axis on 0,0,0 then rotate and move it back where it was. This step is saved by the RotateBefore function. regards, Patrick
  4. You can also directly check "if ! h" the handle class has the boolean method implemented. regards, Patrick
  5. PythonBeginContext; PythonExecute( 'import os' ); PythonExecute( 'os.remove( r"C:\Users\admin\Desktop\remove.txt")' ); PythonEndContext; This should do it. Make sure the file is in a dir where VW has the permission to delete it. regards, Patrick
  6. PatW

    Truss Pickups

    1. Import the sym from my attached drawing, replace existing 2. Select the hoist where this symbol is used and select the pickup in the OIP as when you set it up the first time, this provokes a refresh. Be sure to select the local pick up symbol from the file and not the one from the libe. regards, Patrick
  7. PatW

    Truss Pickups

    Attached is the modified symbol that fits to the truss. Please replace it in your file and then reselect it in the Hoist OIP "Select PickUp Symbol..." regards, Patrick 24PinTrussPick.vwx
  8. PatW

    Truss Pickups

    You can change the "Low Hook To load Trim" value in the "Geometry" section, this will change the pick up position without changing the hoists Z position. Can you share this file. regards, Patrick
  9. Wem sagst du das 😄 Off yourse this is not desired behaviuor, but at least you can use the alternative key shortcut it until the bug is fixed. I will push this foreward.
  10. I guess your are using a quertz keyborad and remember that there was an issue doing the undo with this. Try it with Ctrl-Y 😉 Tell me if that works.
  11. Replace the MOve code by this. If it is a param obj it will use SetEntityMatrix.
  12. Try the node "Set Entity Matrix". regards, Patrick
  13. I see nothing wrong, also the example has this issue. https://developer.vectorworks.net/index.php/VS:PythonExecute As a workaround i would add the whitespace and always check if the first letter is a whitespace (in case the problem gets fixed). If the first letter is a whitespace you have to remove it again. regards, Patrick
  14. VectorScripts always have to be triggered by the user you can not listen for events in the background. That would be possible with the C++ SDK. If you want to communicate with OAuth by a menu command, it should be possible with python.
  15. GetBBox Take a look at https://developer.vectorworks.net/index.php/VS:Function_Reference#Object_Info Maybe HWidth, HLength is better in your case.
  16. I found it practical to use a "Pass" node in a shiny color for comments. But better try to split the network in many capsulated wrappers that describe themself with their name, so you keep it cleaner and don't need to maintain the comments.
  17. I was having a look. In the case off the "Truss Record" the values are saved as strings with the unit.
  18. Hi tbexn, use the Trussitem parametric record for the length, I don't know how python gives you the value, but all Dimensions fields save their value as millimeter internally, the UI like ObjectInfoPalette then automatically converts it. Secondly for HP made up of individual symbols (so no truss record) is there a way to get either the symbols total length or the even more directly the HPs total length? I would use the bounding box off the geometry in the symbol definition. Don't use the BoundingBox off the HangingPosition because it will not be accurate if the HP or profile is rotated (inside the HP). regards, Patrick
  19. Hi Andreas, For rounding the string use the placeholder {:+.2f} This placeholder combines 2 fromating types. See doc: https://www.w3schools.com/python/ref_string_format.asp Input: sFormat: "The Formated number is {:+.2f}" sArg: 9.99 outPut: "The Formated number is +10.00" regards, Patrick
  20. No problem: valve_example_v2021b210_v2019.vwx
  21. Hi Marau, attached is a little example off the valve node that lets you run code optionally. valve_example.vwx
  22. 1. For every symbol defined in the resource manager there is one Symbol Definition (grouplike object that contains the actual objects) that can have multiple Symol Instances in the drawing. You collected the symbol instances. To get the definition you have to get the name first: 1.1 So to get the symbol off a lightning device you get the symbol instance inside the parametric object (grouplike object). In the doc is a good example off iterating groups: https://developer.vectorworks.net/index.php/VS:FInGroup 2. To find param objects by a creatia you have to look if the parametric record is present which is mostly eual to the name in the OIP:
  23. Vs errors are basically prints and no real exceptions, no way to catch them. For what reason do you need developer mode enebaled then? If it's just to show some prints you can put a link to the output on your desktop and disable dev mode: C:\Users\admin\AppData\Roaming\Nemetschek\Vectorworks\2020\ErrorOut.txt
  24. Check in the script editor(top right) that PPython is the selected Language I supsect you have VectorScript selected. regards, Patrick
×
×
  • Create New...