PDA

View Full Version : MultiLayer?


vndesperados
14-05-2005, 12:01 PM
Hi!
I've a project about VBA Cad and I've a trouble
I wana create a Layer List Box but I can't choice multi Layer.
I just choice only a layer
How must I do?
Any fedback is helpful

Eddie
15-05-2005, 08:32 PM
8) Change the list box select property to multiselect (see attached image) ...

Another way is to set this property in your code ..
userform1.ListBox1.MultiSelect = fmMultiSelectExtended

vndesperados
17-05-2005, 11:17 AM
Hi Eddie
Thank for your reply.
I know that but When I choice a layer or some layer I can't use the Code


userform1.ListBox1.MultiSelect = fmMultiSelectExtended
layerstr=userform1.listbox1.text

Can you help me?

Thank
Best regards

hendie
17-05-2005, 12:02 PM
The default property for a ListBox is the Value property

layerstr=userform1.listbox1.value

but this will not work for a multi selection. For a multi selection, you will need to loop through all the items in your listbox and check which ones are selected and add them to a list or array.. something like..

For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then

DO YOUR STUFF HERE

End If
Next i

vndesperados
17-05-2005, 03:20 PM
Hi Eddie
Thank your help, it 's verry useful for me.
In VietNam I can't find any document about AutoCad VBA.
I've only read VBA document from VBA's Help in AutoCad.
Can you give some Add. on net about AutoCad VBA?
Can you help me something?
I've a drawing and I wana create some layout (Ex: A0, A1, A2.. ) and set paper's size for this layouts

Thank Eddie!
Have you been in VietNam.
Hope meet you in my country.
Best regards

Eddie
17-05-2005, 08:50 PM
try this site it's good for learners..

http://www.afralisp.com/