Visual Basic Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to make the selected value in a combobox the current layer in the drawing
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
119 Views, 2 Replies
12-19-2012 07:09 AM
Private Sub UserForm_Initialize() Dim layerColl As AcadLayers Dim entry As AcadLayer Dim LayList As String Set layerColl = ThisDrawing.Layers For Each entry In layerColl ComboBox1.AddItem entry.Name Next End Sub
Hi,
I have a form with a combobox. That combobox is filled up with all layers in a drawing. (see above)
Now I want to make the layer that I have selected (value) in the combobox the current layer in my drawing.
How can i make it current?
thanks gr. László
Solved! Go to Solution.
Re: How to make the selected value in a combobox the current layer in the drawin
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-19-2012 09:26 AM in reply to:
lanieuwe
Hi,
try
ThisDrawing.ActiveLayer = ThisDrawing.Layers.Item(Combobox1.Text)
-. alfred -
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: How to make the selected value in a combobox the current layer in the drawin
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-20-2012 01:53 AM in reply to:
alfred.neswadba
Thank you Alfred!
It was the item...
I wish you a nice christmas!
László
