Is it possible to make a VB program and
run it in Intellicad 2001 PE v3.3
I would like to do a menu Toolbar
likely toolbar_properties in Autocad 2000
Is it possible to do it with VB or VBA?
Thanks
#3
I appreciated your help. The Intellicad status bar to change the current
layer doesn't work very well when we have a lot of layers in the drawing
I decide to make a VBA macro to change the currenet layer but I am a
beginner VBA user and I wish a docked form but I don't know to do it
look the code bellow and please make a suggestion.
Is it possible to make a docked form?
Thank you
Sub Layers()
On Error Resume Next
frmLayerList2.ComboBox1.Clear
Dim nLayer As Layer
Dim aRR() As String, J As Integer
J = ThisWorkspace.ActiveDocument.Layers.Count
ReDim aRR(J - 1) As String
For I = 0 To J
aRR(I) = ThisWorkspace.ActiveDocument.Layers.Item(I).Name
Next
Call BubbleSort(aRR)
For I = 0 To J
frmLayerList2.ComboBox1.AddItem aRR(I)
Next I
frmLayerList2.ComboBox1.Text = ThisWorkspace.ActiveDocument.ActiveLayer.Name
frmLayerList2.Show
End Sub
Private Sub BubbleSort(aRR() As String)
Dim I As Integer, J As Integer, Low As Integer, HI As Integer, Temp As String
Low = LBound(aRR)
HI = UBound(aRR)
For I = Low To HI - 1
For J = I + 1 To HI
If aRR(I) > aRR(J) Then
Temp = aRR(I)
aRR(I) = aRR(J)
aRR(J) = Temp
End If
Next J
Next I
End Sub
Form
Private Sub ComboBox1_Change()
Dim currLayer As Layer
For Each currLayer In ThisWorkspace.ActiveDocument.Layers
If currLayer.Name = ComboBox1.Text Then
ThisWorkspace.ActiveDocument.ActiveLayer = currLayer
End If
Next currLayer
End Sub
layer doesn't work very well when we have a lot of layers in the drawing
I decide to make a VBA macro to change the currenet layer but I am a
beginner VBA user and I wish a docked form but I don't know to do it
look the code bellow and please make a suggestion.
Is it possible to make a docked form?
Thank you
Sub Layers()
On Error Resume Next
frmLayerList2.ComboBox1.Clear
Dim nLayer As Layer
Dim aRR() As String, J As Integer
J = ThisWorkspace.ActiveDocument.Layers.Count
ReDim aRR(J - 1) As String
For I = 0 To J
aRR(I) = ThisWorkspace.ActiveDocument.Layers.Item(I).Name
Next
Call BubbleSort(aRR)
For I = 0 To J
frmLayerList2.ComboBox1.AddItem aRR(I)
Next I
frmLayerList2.ComboBox1.Text = ThisWorkspace.ActiveDocument.ActiveLayer.Name
frmLayerList2.Show
End Sub
Private Sub BubbleSort(aRR() As String)
Dim I As Integer, J As Integer, Low As Integer, HI As Integer, Temp As String
Low = LBound(aRR)
HI = UBound(aRR)
For I = Low To HI - 1
For J = I + 1 To HI
If aRR(I) > aRR(J) Then
Temp = aRR(I)
aRR(I) = aRR(J)
aRR(J) = Temp
End If
Next J
Next I
End Sub
Form
Private Sub ComboBox1_Change()
Dim currLayer As Layer
For Each currLayer In ThisWorkspace.ActiveDocument.Layers
If currLayer.Name = ComboBox1.Text Then
ThisWorkspace.ActiveDocument.ActiveLayer = currLayer
End If
Next currLayer
End Sub
#4
AHM,
That is not possible. What you could do is define the position of your form in the properties window. You can set 'StartUpPosition' to '0 - Manual' add add custom values to the fields 'Left' and 'Top'
(I've created a Layer SpeedBar for IntelliCAD 3.3. It includes the abilities you are making. You could check it out at [url=http://www.hydrologica.hu).]www.hydrologica.hu).[/url]
I probably should make it available as an add-in, but since I do not own a version 4, I would not be able to test it.
Gerrit
Unfortunal
That is not possible. What you could do is define the position of your form in the properties window. You can set 'StartUpPosition' to '0 - Manual' add add custom values to the fields 'Left' and 'Top'
(I've created a Layer SpeedBar for IntelliCAD 3.3. It includes the abilities you are making. You could check it out at [url=http://www.hydrologica.hu).]www.hydrologica.hu).[/url]
I probably should make it available as an add-in, but since I do not own a version 4, I would not be able to test it.
Gerrit
Unfortunal