-
Posts
319 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Everything posted by Peter Vandewalle
-
Delimiters? Different by Language/County?
Peter Vandewalle replied to Pat Stanford's topic in Vectorscript
You’re right about the delimiters when it comes to numbers. But for records/fields in Vectorworks worksheets the delimiter is always a period. -
I think “value” was available way before 2015. “Substring” most likely wasn’t.
-
linking text with a worksheet value
Peter Vandewalle replied to alan_e's topic in General Discussion
What you’re trying to do can’t be done. A spreadsheet reads objects in the drawing, not the other way round. -
Show Makro Code of existing interiorcad Makros?
Peter Vandewalle replied to KingChaos's topic in Marionette
Most of them aren’t even Python or Vectorscript but C++. And of course as Pat is saying, they are locked. -
How to use Parameter/Strings in the Script?
Peter Vandewalle replied to deepImplement's topic in Python Scripting
In Python just use this form: par = vs.Pparametername where par is the value in your python script and parametername is the PIO parameter. -
Saved Views Names in script
Peter Vandewalle replied to Peter Vandewalle's topic in Python Scripting
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... -
Saved Views Names in script
Peter Vandewalle replied to Peter Vandewalle's topic in Python Scripting
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... -
Looks like a subdivision object!
-
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?
-
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;
-
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
-
Can you send a larger par tof the script? It's pretty hard to answer this.
-
Slab style and roof style resource id's?
Peter Vandewalle replied to Peter Vandewalle's topic in Vectorscript
I know, I found them already 🙂 But thanks anyway! -
Does anyone know the resource-id's for Slab Styles and Roof Styles? I know the Wall Styles id is 127...
-
Multiply two database cell values
Peter Vandewalle replied to martinfdc's topic in General Discussion
Just put 1 and add values... -
Multiply two database cell values
Peter Vandewalle replied to martinfdc's topic in General Discussion
Instead of =COUNT you can also just insert 1 into B2. No “=“ just the number 1. -
Multiply two database cell values
Peter Vandewalle replied to martinfdc's topic in General Discussion
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. -
If you need more feedback or info about this, just call Design Express support and ask for Peter.
-
What classing system would you like to use?
-
Changing the classing system in Vectorworks can be a lot of work. Classes are indicated all over the place.
-
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
-
Have you tried to add the extension to the filename? =RunScript(120, ‘GetPluginStyle.txt’)
-
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.
-
MoveTo(ControlPoint01X + <X-value>,ControlPoint01Y +<Y-value>) should work. ControlPoint01X and ControlPointY01 are considered coordinates from the PIO origin. So they are just reals.
-
Get rid of popup every time I exit Plug In Manager
Peter Vandewalle replied to Nik's topic in Python Scripting
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...