What is wrong with this SendCommand?
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
What is wrong with this SendCommand?

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
ajtruckle
Guest





Posted: Thu Dec 16, 2004 3:37 pm    Post subject: What is wrong with this SendCommand? Reply with quote

[pre]
Dim strCommand As String
strCommand = "break "
strCommand = strCommand & ent.Handle
strCommand = strCommand & " f"
strCommand = strCommand & " " & breakPnt(0) & "," & breakPnt(1) & "," & breakPnt(2)
strCommand = strCommand & " " & breakPnt(0) & "," & breakPnt(1) & "," & breakPnt(2)
strCommand = strCommand & vbCr

ThisDrawing.SendCommand (strCommand)
[/pre]

I think the ent.Handle is wrong (ent is a AcadObject)

Back to top
Alfred NESWADBA
Guest





Posted: Thu Dec 16, 2004 3:46 pm    Post subject: Re: What is wrong with this SendCommand? Reply with quote

In article <10928478.1103193479252.JavaMail.jive@jiveforum1.autodesk.com>, nospam@address.withheld says...
Quote:
[pre]
Dim strCommand As String
strCommand = "break "
strCommand = strCommand & ent.Handle
strCommand = strCommand & " f"
strCommand = strCommand & " " & breakPnt(0) & "," & breakPnt(1) & "," & breakPnt(2)
strCommand = strCommand & " " & breakPnt(0) & "," & breakPnt(1) & "," & breakPnt(2)
strCommand = strCommand & vbCr

ThisDrawing.SendCommand (strCommand)
[/pre]

I think the ent.Handle is wrong (ent is a AcadObject)

hi,



first you cannot select an entity at the command-prompt with 'ent.handle', instead use

dim tObjLspByHandle as String
tObjLspByHandle = "(handent """ & ent.handle & """)"

next you have to make sure, that your decimal-separator is a point and not a column, so:
dim tXStr as String
tXStr = replace(breakpoint(0),",",".")

- alfred -
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB