Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by _c_

  1. Like many before me, I am struggling to get any kind of User Interaction work in custom plug-ins. This is Vectorscript-Python only, Vectorscript-Pascal works flawlessly. This affects routines like vs.GetPt, vs.GetPtLn, vs.GetPickObjectInfo, vs.TrackObjectN, etc.: there is no way to set global vars, and most attempts crash VW. I read over and over all posts in the present list, I cannot get it done. I am fairly new to Python, so first of all I ask: is anyone aware of a way to get above mentioned routines work in custom plug-ins? If yes, please let me know how. Otherwise, I'd like to file bug reports. Hopefully we can get a fix at one point, since this problem is recorded since Python was introduced in VW. There are two things discouraging users to switch from Pascal to Python: lack of user interaction support and weak code encryption. If we could resolve the first it would be great. Please @K.Lalkovski, can you help us there? Thank you _c_
  2. Are we now in for a sterile discussion? Others [for example us] might need it, I am afraid. We speak about generated sections or elevations from shipped objects. That's something particular, different than coordinating models. That's standard plans and sections, no matter how you get them, they must comply to the environment they are to be used into. [deleted. This is indeed so useless]
  3. si, exactly. I was referring to this discussion, where I indeed said "it cannot be done":
  4. @Christiaan said I said it cannot be done. You said " you bet". I felt unjustly accused! Where did I say that issuing plans and sections in VW cannot be done? That's the one thing VW does better than any other app, I do have quite a problem with the objects generating above mentioned plans and sections, so do you -both- and any architect in this list, BTW. 😋
  5. ? Issuing correct IFC for multiple buildings from a singular file: how can it be done, so that the singular buildings are properly issued? I don't know how. Issuing plans and sections? That can be done.
  6. Ciao Zoomer, I don't think that you can: VW sees the document as a building. Also, you get into quite a construction for the IFC Export dialog: this does allow to export what's visible, but doesn't allow to store configurations, so you would have either to map very very carefully the storey names or re-list the needed levels in there each time.
  7. Yes! LOL Yes, this is wrong: there is support for the dongle in the main application. I have two licences for VW International version, which is exactly the USA version, only much more expensive. There is no reason whatsoever to limit them.
  8. Because, as a free lance BIM whatsoever, I could go to any office, plug my own dongle, swap the number and work for them. Now I cannot. Because, as dongle user I could use it across ALL versions from the very beginning of the dongle age, and I did: I have machines for most versions, I can develop, recover your file forensically, do anything with VW like no-one out there. Now I can't: only 3 versions supported. Because, when on holiday in the remotest spot of the Italian Maremma, without even cell coverage, I could dive deep into whatever programming dream of mine. Now I can't, you have deinstall here and there first. Or you might be blocked. Because, as I have been using the E-version as beta tester for the last 13 years as well, and can tell you that all the totally cool-free-fancy stuff above mentioned simply isn't possible any longer And finally, because this limit is only in Germany: VW DIDN'T stop dongle support, only our otherwise much esteemed distributor did. They do a lot of good things. This is BAD.
  9. I am following with big interest a certain Dion Moult, who's involved into that. He's regular contributor at BulidingSmart forum. His posts are a wealth of knowledge. I certainly also want to try BlenderBIM as soon as I have some time. And no, time involved into OpenSource is always good time.
  10. Ciao Jeff, no. The wacom is more than Ipad + pen, even if the new apple pen 2 does have a very high quality. The size of the display is very large, the customisation nearly boundless. I could go on. Yes, it is plain luxus, but whatever...
  11. This is insane. I bought the new Wacom Intuos Pro tablet: it turns even Windows into an iPad 😍: it's a touch pad! I will buy the new 3D pen soon, it wasn't immediately available, let's see how it works.
  12. You press the space bar, and while this is kept pressed, you can zoom in/out, do a number of other things, then release the space bar and continue rotation or anything.
  13. If you map zoom in to C and zoom out to V, then you can either double-c or double-v --> you zoom by factor, I think OR draw a marquee which will be zoomed in/out, if the first mode is activated that's the mode I prefer. It brings you just the right zoom on the right object.
  14. Like you, I also sometimes miss the scroll wheel, but not in VW, where I always used the old keys C and V for zoom in and out. It is preciser, faster than the scroll wheel and far less taxing on the graphic card. Having a third button should help assigning them. These days I am nearly exclusively on Solibri and a third button is good there. Solibri is rather difficult as of the views, compels you to zoom in over and over again, and there is no customisation of the keys AND there are one thousand key variants for the tiniest actions.
  15. Did anybody try the new Wacom Intuos Pro 3D pen? I am tempted. They ditched the "eraser" on the back and added a third button in the thumb area. So now full fledged 3-buttons mouse value.
  16. It will be such fun! Vectorscript is very rewarding, it will give you power and endless brainfood. I bring Vectorscript code 'problems' for my long runs. There is nothing better for forgetting yourself for a couple of hours.
  17. Ciao @michaelk, no, nothing new there. I illustrate here the code that you mentioned: resultStatus := GetCustomObjectInfo(objName, objHd, recHd, wallHd); sets all basic variables to operate on the running plug-in code objName universal name of the running plug-in objHd handle of the running plug-in as instance of a definition (record, type 48) recHd handle of the running plug-in definition (record, type 47) wallHd for wall-insertable objects, handle of the parent wall (if any) ControlGeometry := GetCustomObjectPath(objHd); Handle to the custom path, an optional geometry that lives inside the path group of the plug-in. This is only relevant for path-based plug-ins or plug-ins where this has been enabled. Point, rectangular or linear plug-ins won't have a path group by default. For those who don't know, plug-ins can have special groups. Profile and path groups, such as for Extrudes along path where the path is used for extruding a given profile. The two special groups can be imagined as "outside" the document and the plug-in. As a repository available for that plug-in. Your plug-in might return an error if you try to use a NIL handle returned by GetCustomObjectPath, but there is no such special group. IF you enable Events, you will be able to code special actions for given events on your pio. For example you might want to be able to edit it as a polygon (and your PIO is a path pio). I posted an example of event enabled Plug-in using various events (such as disclosure widgets) a few weeks ago: SetObjectVariableBoolean(objHd, 800, TRUE); Enables text operations on the running pio. This will allow to set the text size and font of the pio using the usual text commands. Mind, this won't make it respond to anything else, such as horizontal and vertical text alignments. Every plug-in object runs "twice" when the developer mode is activated. Either in the VW prefs or by script using SetPref(21, TRUE);
  18. Hello everybody, I transferred the Object Events article previously on Vectorlab to the Developer Wiki: https://developer.vectorworks.net/index.php/VS:Object_Events This article was written by Charles Chandler on 2007, and is still very useful. Ciao, _c_
  19. There. It just drove me nuts for the second time. Here the solution: Revit 2021 > View > Visibility / Graphics Tab: Model Categories Expand Item: Generic Models Switch off: IfcOpeningElement
  20. VW doesn't. It targets the small praxis or singular architect. Preferably American. For this target VW is the best value for its money. And I still would recommend VW to any young professional starting up an office.
  21. I can confirm all that's said so far. Below the old example from Jeff Geraci adapted: the index is 0-based, SelectChoice selects only the last used index in the loop, unregarded the fact that the List Box accepts USER multiple-selection. It indeed doesn't seem to translate into scripts. Dev states about List Boxes Scripted API functions for retrieving and managing pulldown menu control options also work with list box controls. So it is entirely possible that since Pull-down menues don't support multiple selection by script, the functionality is missing here too (whereby I did once succeed into having multiple selection in pull down menus). Caro Sam, I would definitely file it as bug, it does feel totally wrong. (* { draws a muliple selection list box 25 characters wide and 7 rows high } CreateListBoxN(2,10,25,7, true); *) { Jeff Geraci, Vlist, Re: List Box, 10 Jun 2005 } PROCEDURE MultiSelListBox; CONST kChooseOK = 1; kChooseCancel = 2; kListBox = 5; kButton = 6; VAR dlogID, result : LONGINT; selCh, i : INTEGER; sel1Str : STRING; sel2Str : STRING; sel1, sel2 : INTEGER; PROCEDURE DialogProc(VAR item: LONGINT; data: LONGINT); BEGIN CASE item OF SetupDialogC: BEGIN AddListBoxTabStop(dlogID, kListBox, 6); AddListBoxTabStop(dlogID, kListBox, 13); AddChoice(dlogID, kListBox, '1a 2abcd 3-123', 0); AddChoice(dlogID, kListBox, '1ab 2abc 3-8653', 1); AddChoice(dlogID, kListBox, '1abc 2ab 3-54754', 2); AddChoice(dlogID, kListBox, '1abcd 2a 3-5432', 3); FOR i:= 0 TO 3 DO SelectChoice(dlogID, kListBox, i, true); { SetSelectionRange(dlogID, kListBox, 0, 3); } { doesn't work } END; kChooseOK: BEGIN { Get first two selections } GetSelectedChoiceInfo(dlogID, kListBox, 0, sel1, sel1Str); GetSelectedChoiceInfo(dlogID, kListBox, sel1+1, sel2, sel2Str); END; END; END; BEGIN dlogID := CreateLayout('List Box', false, 'OK', 'Cancel'); CreateListBoxN(dlogID, kListBox, 40, 10, true); SetFirstLayoutItem(dlogID, kListBox); result := RunLayoutDialog(dlogID, DialogProc); Message('Selections: ', sel1, ' & ', sel2); END; Run(MultiSelListBox); { The last parameter of CreateListBoxN indicates whether the list box should be a multi-selection list box. A list box cannot be changed from single-sel to multi-sel (or vice-versa) at runtime. To retrieve the values, use GetSelectedChoiceInfo in a loop. Pass 0 for atChoice to retrieve the first selection, and choiceNumber will contain the index of that item. To retrieve the next one, pass choiceNumber + 1 for atChoice. Repeat this process until -1 is returned for choiceNumber. Also, if no items are selected in the list box, -1 will be returned for choiceNumber. Regards, Jeff Geraci Nemetschek North America }
  22. Grazie Vlado, I bring it on dev, Charles' article is very very good, helped all of us. People will love to have it back! It can be updated and expanded once is there.
  23. Init properties: During the init event you set up the Object Info Palette behaviour and other things: if theEvent == kObjOnInitXProperties: If you want to use buttons and/or Custom pull-down menus you need to turn on UIoverride: ok = vs.SetObjPropVS( kObjXPropHasUIOverride, True ) IF, and only IF, you also want to use custom pull-down menus loading custom values, you will also need to enable custom widget visibilities. If you do this, you cannot use vs.SetParameterVisibility or vs.EnableParameter, which use parameter names, you can only use vs.vsoWidgetSetVisible and vs.vsoWidgetSetEnable. These need parameter indexes, so you must keep track of the parameter indexes and store them somehow as file. This does add complexity (I have a sub auto-filling a list as text into the right place): # not used in the test example: vs.SetObjPropVS(kObjXHasCustWidgetVisibilities, True); # only needed for custom pull-down menus with special lists of values # after enabling this prop you need to set visibilities during event kObjOnWidgetPrep To have the lovely widget groups, you must enable them ok = vs.SetObjPropCharVS( kWidgetGroupMode, vs.Chr(kWidgetGroupAutomatic), True ) # add widget groups Add parameters as static text turn the static text into separators. Mind that the routine vs.vsoInsertWidget takes a string and places it in the Object Info Palette. You can use the localised parameter name. Since the function (boo, locParmName) = vs.GetLocalizedPluginParameter(pioRecName, univParmName) returns two vars, it cannot be used directly, so I created one simple sub named O_GetLocParmName that does that: return only a string. ok = vs.vsoInsertWidget( cP___div0 -1, kWidgetSeparator, cP___div0, 'parameter name', empty); # it is advisable to use the localized name ok = vs.vsoInsertWidget( cP___div0 -1, kWidgetSeparator, cP___div0, O_GetLocParmName(gPio_N, '__div0'), empty); # O_GetLocParmName is a subroutine that fetches only the string, dropping the boolean, # so I can use it directly in vs.vsoInsertWidget def O_GetLocParmName(pioRecName, univParmName): (boo, locParmName) = vs.GetLocalizedPluginParameter(pioRecName, univParmName) return locParmName add indenting levels. These turn the widgets into expandable widgets. Don't omit to set the 0-levels, or things are going to mess up: titles = [cP___div0, cP___div1, cP___div2] for i in range(vs.NumFields(gPioRec_H) +1): if (i in titles): vs.vsoWidgetSetIndLvl(i, 0) else: vs.vsoWidgetSetIndLvl(i, 1) Warning: you will need to close and re-open your document to see widget groups display properly EVERY time you change something in the parameter index list (add, delete parameters)
  • Create New...