Jump to content

Peter Vandewalle

Distributor
  • Posts

    319
  • Joined

  • Last visited

Everything posted by Peter Vandewalle

  1. You’re right about the delimiters when it comes to numbers. But for records/fields in Vectorworks worksheets the delimiter is always a period.
  2. I think “value” was available way before 2015. “Substring” most likely wasn’t.
  3. What you’re trying to do can’t be done. A spreadsheet reads objects in the drawing, not the other way round.
  4. Most of them aren’t even Python or Vectorscript but C++. And of course as Pat is saying, they are locked.
  5. In Python just use this form: par = vs.Pparametername where par is the value in your python script and parametername is the PIO parameter.
  6. Thanks JBenghiat, I was afraid so. Then I'll have to enter the saved view name into a script parameter. I managed to use an external script and a worksheet so modifications can be done in one central place...
  7. Thanks Pat, But the script in the saved view (via the edit script button) doesn't know the name of the script it belongs to. That's what I'm after...
  8. I'm working on some saved views scripts. This is very powerful, but now I'd like to store some script parameters in a worksheet. But to do so I need to get the name of the currently running saved view. Any ideas on how to get that name?
  9. They are available for Vectorscript and Python. But only on action-driven PIO's. You also need to add the parameters in the order they need to appear and with the necessary indents: You'll need some extra lines in the event section of the script. I also run a procedure in that part: "object_info_palet". This one holds some extra procedures to create the parameters and separators with the needed indentation. Hope this helps: CASE theEvent OF kOnInitPropertiesEventID: BEGIN bTest := SetObjPropCharVS(kWidgetGroupMode, Chr(kWidgetGroupAutomatic)); object_info_palet; END; ... function insert_separator(liID: integer; lsPIOName, lsParameter: string; liIndent: integer): integer; var lbResult: boolean; lsTmp: string; begin lbResult := GetLocalizedPluginParameter(lsPIOName, lsParameter, lsTmp); if lbResult then begin lbResult := vsoAddWidget(liID, 100, lsTmp); lbResult := vsoAppendWidget(100, liID, lsTmp, 0); vsoWidgetSetIndLvl(liID, liIndent); end; insert_separator := liID+1; end; function insert_parameter(liID: integer; lsPIOName, lsParameter: string; liIndent: integer): integer; var lbResult: boolean; lsTmp: string; begin lbResult := GetLocalizedPluginParameter(lsPIOName, lsParameter, lsTmp); if lbResult then begin lbResult := vsoAddParamWidget(liID, lsParameter, ''); lbResult := vsoAppendParamWidget(liID, lsTmp, 0); vsoWidgetSetIndLvl(liID, liIndent); end; insert_parameter := liID+1; end; procedure object_info_palet; var liID: integer; begin liID := 100; liID := insert_separator(liID, sPIOName, 'chGlobal', 0); liID := insert_parameter(liID, sPIOName, 'ObjType', 1); liID := insert_separator(liID, sPIOName, 'ch3D', 0); liID := insert_parameter(liID, sPIOName, 'DivSymbol3D', 1); ... end;
  10. NameClass('classname'); will make that class active. http://developer.vectorworks.net/index.php/VS:NameClass You might want to add PushAttrs; at the beginning of the script and PopAttrs; at the end to avoid changing the active class. sClassName := GetClass(ObjH); Will get you the classname of the current object. http://developer.vectorworks.net/index.php/VS:GetClass
  11. Can you send a larger par tof the script? It's pretty hard to answer this.
  12. Does anyone know the resource-id's for Slab Styles and Roof Styles? I know the Wall Styles id is 127...
  13. Instead of =COUNT you can also just insert 1 into B2. No “=“ just the number 1.
  14. I see the value in A2 is summed. I suppose B2 has added values. You should also add values in D2. Otherwise you’ll get the unitary price. By the way you don’t even have to put a calculation in D2. Just the same formula as in C2 would do, just add the values. In a worksheet all rows are calculated and only after the row calculation sums and add values are calculated. This means that in B2 there will always be “1” so B2*C2 equals 1*C2 or just C2. After that calculation rows are summed and values added where this is asked. I hope this is clear.
  15. If you need more feedback or info about this, just call Design Express support and ask for Peter.
  16. What classing system would you like to use?
  17. Changing the classing system in Vectorworks can be a lot of work. Classes are indicated all over the place.
  18. Hello SDLaw The "porte intérieure" tool in the Benelux version is another tool than the one in the US version. So is the window tool. For the Benelux version classing is based on an European SfB system. I attached a pdf the table of those classes in French. --Peter Vandewalle SfB BE-FR.pdf
  19. Have you tried to add the extension to the filename? =RunScript(120, ‘GetPluginStyle.txt’)
  20. The click to insert the object into the drawing will be the origin (0,0) of everything you code inside the object. Just like in a symbol. You can get a handle to the PIO with GetCustomObjectInfo. Then you can get the coordinates of the insertion point with GetSymLoc3D.
  21. MoveTo(ControlPoint01X + <X-value>,ControlPoint01Y +<Y-value>) should work. ControlPoint01X and ControlPointY01 are considered coordinates from the PIO origin. So they are just reals.
  22. I just have this inside the plugin manager: import <name of py-file> <name of py-file>.<name of routine to run>() i.e.: The py-file contains the complete script, so you hardly ever have to enter the plugin manager...
×
×
  • Create New...