Message 1 of 3
Sendcommand
Not applicable
09-30-2002
03:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am writing a program in AutoCAD 2000.
The program must change UCS a number of times referring to some blocks insert in 3D.
To change USC I use the following code
Public Function ChangeUcs (ObjHand As String) As Boolean
Dim Command As String
Command = "Ucs" & vbCr & "ob" & vbCr & "(HANDENT " & Chr(34) & ObjHand & Chr(34) & ") "
ThisDrawing.SendCommand Command
ChangeUcs = True
End Function
My problem is the following:
The program runs perfect when started from the VBA editor, but it will not run called direct from AutoCAD.
I seams, as the "sendcommand" is not executed before the program is ended.
I use the "sendcommand" I other variations without problems, so I assume it is the UCS operation that fails.
Can anyone give me a tip on how to run the code from AutoCAD?
The program must change UCS a number of times referring to some blocks insert in 3D.
To change USC I use the following code
Public Function ChangeUcs (ObjHand As String) As Boolean
Dim Command As String
Command = "Ucs" & vbCr & "ob" & vbCr & "(HANDENT " & Chr(34) & ObjHand & Chr(34) & ") "
ThisDrawing.SendCommand Command
ChangeUcs = True
End Function
My problem is the following:
The program runs perfect when started from the VBA editor, but it will not run called direct from AutoCAD.
I seams, as the "sendcommand" is not executed before the program is ended.
I use the "sendcommand" I other variations without problems, so I assume it is the UCS operation that fails.
Can anyone give me a tip on how to run the code from AutoCAD?