graham.71425
2005-01-10, 11:12 AM
Just trying to get my head round the basics, I want to write some code that inserts ADT2005 Structural Members. I have located the objects in the references, but am struggling to find an example of the syntax required. I have tried writing the code in the same manner as I would for a line but with no success.
The Code I have tried is as follows:
'Generate A Panel
Public Sub GenPanel()
Dim StPt As Variant
Dim EndPt As Variant
Dim BR As AecsMember
StPt = ThisDrawing.Utility.GetPoint(, vbCrLf & "Enter Start Point:")
EndPt = ThisDrawing.Utility.GetPoint(StPt, vbCrLf & "Enter End Point:")
Set BR = ThisDrawing.ModelSpace.AddCustomObject("AecsMember")(StPt, EndPt)
End Sub
"AddCustomObject("AecsMember")" I got from the help file, but I'm expect this is where I am going wrong!
Could some one point me in the right direction and or tell me where I could find some examples of code using ADT objects.
Any help would be gratefully received.
Graham.
The Code I have tried is as follows:
'Generate A Panel
Public Sub GenPanel()
Dim StPt As Variant
Dim EndPt As Variant
Dim BR As AecsMember
StPt = ThisDrawing.Utility.GetPoint(, vbCrLf & "Enter Start Point:")
EndPt = ThisDrawing.Utility.GetPoint(StPt, vbCrLf & "Enter End Point:")
Set BR = ThisDrawing.ModelSpace.AddCustomObject("AecsMember")(StPt, EndPt)
End Sub
"AddCustomObject("AecsMember")" I got from the help file, but I'm expect this is where I am going wrong!
Could some one point me in the right direction and or tell me where I could find some examples of code using ADT objects.
Any help would be gratefully received.
Graham.