Sendcommand

Sendcommand

Anonymous
Not applicable
323 Views
4 Replies
Message 1 of 5

Sendcommand

Anonymous
Not applicable
Hi,

I got the following error message while using SENDCOMMAND to change the UCS in the program.

SOURCE CODE :

Dim objline As AcadLine
dim x as variant

ThisDrawing.Utility.GetEntity objline, x, "Select the cs line"
ThisDrawing.SendCommand "ucs" & vbCr & "n" & vbCr & "OB" & vbCr & objline.ObjectID & vbCr


ERROR MESSAGE:

Command: Select the cs line 'HERE I SELECTED THE LINE.
Command: ucs

Current ucs name: *WORLD*
Enter an option [New/Move/orthoGraphic/Prev/Restore/Save/Del/Apply/?/World]
: n

Specify origin of new UCS or [ZAxis/3point/OBject/Face/View/X/Y/Z] <0,0,0>: OB

Select object to align UCS: 25595312
No object found



When i tried the same in Command prompt, it is working fine.

Any help in this regard will be very useful.


Regards
Anand singh
0 Likes
324 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
    I had similar probems with the
sendcommand using earlier versions of

    A2000. Try updating to a
later build (T.1.07 seems to be o.k).

   

   

 


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Hi,

I got the following error message while using SENDCOMMAND to change the UCS
in the program.

SOURCE CODE :

Dim objline As AcadLine
dim x as variant

ThisDrawing.Utility.GetEntity objline, x, "Select the cs line"

ThisDrawing.SendCommand "ucs" & vbCr & "n" & vbCr & "OB"
& vbCr & objline.ObjectID & vbCr


ERROR MESSAGE:

Command: Select the cs line 'HERE I SELECTED THE LINE.
Command: ucs

Current ucs name: *WORLD*
Enter an option
[New/Move/orthoGraphic/Prev/Restore/Save/Del/Apply/?/World]
<World>:
n

Specify origin of new UCS or [ZAxis/3point/OBject/Face/View/X/Y/Z]
<0,0,0>: OB

Select object to align UCS: 25595312
No object found



When i tried the same in Command prompt, it is working fine.

Any help in this regard will be very useful.


Regards
Anand singh

0 Likes
Message 3 of 5

Anonymous
Not applicable
Instead of using the sendcommand to change a ucs
you could maybe use this:

 

   Dim ucsObj As AcadUCS
  
Set ucsObj = ThisDrawing.UserCoordinateSystems.Add(pdblOrigin, pdblPointX,
pdblPointY, "New_UCS")
   ThisDrawing.ActiveUCS =
ucsObj

I've been using that for awhile and it always seems
to work correctly, hope this might help 🙂

 

Michael.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi,

I got the following error message while using SENDCOMMAND to change the UCS
in the program.

SOURCE CODE :

Dim objline As AcadLine
dim x as variant

ThisDrawing.Utility.GetEntity objline, x, "Select the cs line"

ThisDrawing.SendCommand "ucs" & vbCr & "n" & vbCr & "OB"
& vbCr & objline.ObjectID & vbCr


ERROR MESSAGE:

Command: Select the cs line 'HERE I SELECTED THE LINE.
Command: ucs

Current ucs name: *WORLD*
Enter an option
[New/Move/orthoGraphic/Prev/Restore/Save/Del/Apply/?/World]
<World>:
n

Specify origin of new UCS or [ZAxis/3point/OBject/Face/View/X/Y/Z]
<0,0,0>: OB

Select object to align UCS: 25595312
No object found



When i tried the same in Command prompt, it is working fine.

Any help in this regard will be very useful.


Regards
Anand singh

0 Likes
Message 4 of 5

Anonymous
Not applicable
Ok I know there is the thisdrawing.SENDCOMMAND "_pline" IN ACAD 2000

But how can I get the Same thing in R14? I need to run a command line
command. Completion of my APP??

Please!!
0 Likes
Message 5 of 5

Anonymous
Not applicable
Hi,

You have to use the evallispexpr function from AcadUnsupp.arx (this contains
a couple of missing functions in R14 VBA)

Search for Acadunsupp.arx in the customer-files Newsgroup to find the file.

Luc Morrissette,
Flairbase inc.

"boswell" wrote in message
news:D732585EED5B532D2054AD727349D58E@in.WebX.maYIadrTaRb...
> Ok I know there is the thisdrawing.SENDCOMMAND "_pline" IN ACAD 2000
>
> But how can I get the Same thing in R14? I need to run a command line
> command. Completion of my APP??
>
> Please!!
>
>
0 Likes