Is there a way to create a listbox (or selectionbox) with checkboxes
near each item in a propertypage created in a macro?
For example, look at the split feature where you can cut a part into
several bodies and keep each one of them as a separate file. It uses
something like a DBgrid with checkboxes. This is sufficient for my
you can add any activeX control in a PMP with
then PropertyManagerPageActiveX::SetClass ...
In my experience, handling PMPs with ActiveX controls requires a lot of
tedious work... good luck!
1. create a listbox
2. change the listbox property "multiselect" to "1-fmmultiselectmulti"
3. add on frm load "ListBox1.ListStyle = fmListStyleOption"
note if multiselect is not changed then the liststyle will be an
option button insted of a checkbox.
Thanks, but I suspect that your answer refers to a VBA-style form with
a "regular" listbox control. I asked about a listbox in SW
propertypage (PropertyManagerPageListbox) or selectionbox
I think this control is much more limited.
Type of control as defined in swPropertyManagerPageControlType_e
ControlType = swControlType_ActiveX
insert a vb selection box as an activeX control.
What happens when the macro with such line (addcontrol) is used in a
computer that does not have a VB installation? Can I simply copy the
activeX file to that pc? Will it work? Do I need to run a registration
if you have microsoft office installed. then you have a working copy
of microsoft visual basic for Applications. this is a choped up
version of visual basic 6.0. the whole microsoft sweet can be modified
and manipulated from this program.
in solidworks if you click tools\macro\new then this will open up
visual basic for applications.
What you're probably after is a tree view, and possibly a sub-classed
It allows indentations, like windows explorer, probably some
checkboxes, etc. And if you subclass it, you can add extra interfaces
(like list boxes, text boxes, file dialogs, you name it, on any node).
I have just finished doing similar, using a 'cloned' Featuremanager
type interface, except instead of giving the user access to
sketch/extrude/mate type features in the assembly, giving
higher-level 'component' features, that drive VB code to update all
relevant components and mates.
Yes, as an interface, you could say it is a tight squeeze: but maybe
thats a GOOD thing. I just ported it over from a previous form-based
interface, which grew too large allowing access to all the features:
you couldnt see the darn assembly underneath.
Yes, tried porting the single-form into a tabbed form; but with
real-time error-checking, I was unable to show the user the 2 (or
more) conflicting values if the values resided on 2 (or more) tabs.
With the tree view, I just save which areas of the tree are expanded
(you listening, Solidworks ?), scrunch everything up but the
and show just those areas expanded. After the user makes his
corrections, I return the user back to the original tree view state.
Not to mention that the user is already familiar with the