Hi all,
A little background to my problem first.
One of my customers passed on my details to another of their clients as someone who could help with their Acad issues. This client is a PLC engineer who knows nothing about CAD as such and does not want to. He runs Acad2000 on an old XP laptop. The first problem was he had lost his toolbars, one of which is a custom toolbar explicitly to run a number of VBA macros. I managed to sort this out after a little while (I last used Acad with Release 14!). After this was sorted he explained that he was worried that his XP laptop would die and he would be lost.
I use Intellicad 11, which some may know is 'similar' to Acad.
Anyway he asked would I look at porting his VBA into Intellicad.
So here I am looking at VBA for the first time!! (in hindsight I should have refused, but too late now)
My current problem:
The following macro is called from one of the buttons in the custom toolbar. I loads a custom for to allow editing of the drawing border attributes.
Sub DAP_ProjectDetailsShow()
Dim t_SSET As AcadSelectionSet
Dim t_Form As Variant
Call SSetDeleteAll
Set t_SSET = SSetCreate("TEMP_SSET", 2, "DAPDRB00")
If (t_SSET.Count = 1) Then
Set t_Form = DAP_DPP
Call DynamicFormLoad(t_Form, t_SSET.Item(0).Handle)
t_Form.show
End If
Call SSetDeleteAll
End Sub
In the module above is the code:
Set t_SSET = SSetCreate("TEMP_SSET", 2, "DAPDRB00")
And then in the Control window I have:
Function SSetCreate(d_SetName As String, d_Mode As Integer, d_Data As String) As AcadSelectionSet
Dim t_SSET As AcadSelectionSet
Dim t_Point1(0 To 2) As Double
Dim t_Point2(0 To 2) As Double
Dim t_Code1(0) As Integer
Dim t_Value1(0) As Variant
Dim t_Code2 As Variant
Dim t_Value2 As Variant
t_Point1(0) = 0: t_Point1(1) = 0: t_Point1(2) = 0
t_Point2(0) = 300: t_Point2(1) = 200: t_Point2(2) = 0
t_Code1(0) = d_Mode
t_Value1(0) = d_Data
t_Code2 = t_Code1
t_Value2 = t_Value1
Set t_SSET = ThisDrawing.SelectionSets.Add(d_SetName)
ThisDrawing.SendCommand ("zoom all" + vbCr)
t_SSET.Select acSelectionSetAll, t_Point1, t_Point2, t_Code2, t_Value2
ThisDrawing.SendCommand ("zoom p" + vbCr)
Set SSetCreate = t_SSET
End Function
In my confused mind I am struggling to understand the highlighted statement.
I think it is looking for the drawing DAPDRB00 (which is a border with attributes) in the area from:0,0,0 to:300,200,0
Could one of you more knowledgeable folk explain for me please?
SteveN.