Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

990 Spectacular

About _c_

  • Rank
    2000 Club

Personal Information

  • Occupation
    BIM architect
  • Homepage
  • Hobbies
  • Location

Recent Profile Visitors

2,742 profile views
  1. 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
  2. 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.
  3. 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 }
  4. 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.
  5. 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)
  6. Explanation: The plug-in needs to be event enabled: you do this in the Options tab of the Plug-in editor: If you work on Python with external files, the plug-in needs to reload the code, so you must turn off caching during development: Here I break down the events employed. There are bucketloads of events, you'll find them in the SDK: MiniCadHookIntf.h and it does take a lot of time to be comfortable with their usage. Some of them I have really no idea what they do, and believe me, I did spend an inordinate about of time on them. The two major files you might want to study are these, but there is far more (the SDK version is here just irrelevant): The code for the plug-in runs a number of times (and double as much if the developer mode is on), vs.GetCustomObjectInfo is compulsory for fetching the needed basic variables: (ok, gPio_N, gPio_H, gPioRec_H, gWall_H) = vs.GetCustomObjectInfo() Every time the code runs, you must fetch the type of event involved and eventually do something during that event. vs.vsoGetEventInfo is compulsory for fetching event info: (theEvent, theButton) = vs.vsoGetEventInfo() # whereby theButton is a generic message (theEvent, aMessage) = vs.vsoGetEventInfo()
  7. About text alignments: you can set a plug-in object to respond to font and text size using vs.SetObjectVariableBoolean(gPio_H, 800, True) but all other text properties, such as horizontal and vertical alignment, etc. must be coded and driven by parameters.
  8. Hello, I was Vectorlab in form of Orso.B.Schmid. The event article was written by Charles Chandler somewhere around 2007, I can bring his work into the dev wiki, but there is documentation and @Vlado certainly will want to do it right, a lot happened ever since. If Vlado gives me the go, I'll bring it there until he has something better.
  9. It is a total coincidence, I have been called in for another thread from the German Forum. Quite spooky, though.
  10. There is a question on the German VW forum about plug-ins with dividers and buttons. An ever recurring topic. I am [ever] switching to Python, and I though it could be a nice exercise for me to try it pythonically. Expand the test file into your User's plug-in folder (there is no installer here) Test.zip The Test PIO _c_ plug-in: uses an external file source (you don't need to script in the Plug-in Editor) is event enabled has a button triggering a script has dividers turns the dividers into expandable group widgets doesn't resolve text alignments, so that will take the active document's settings I am new to Python and am sure that this can be done more efficiently, I'll throw it thus here in the forum, let's learn.
  11. @Dave Donley, I used them recently for their shadows. I must say, I fell in love with them...
  12. How many years ago, incredible.
  13. Where can I vote this up in a way that it will come true.
  14. And I expressly ask for this victim not to be Matt Panzer. The Barn door, albeit the most ridiculously named building thing in VW, was done very well. BTW, did anyone ever quantified, for real, the image damage done by that name -Barn- outside USA? Did anyone?
  15. I am fully of your opinion: whoever decides that Irrigation and Barn doors are a priority should please be tied up to a screen displaying non-stop our rants.


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...