Pause Symbol

Pause Symbol

Anonymous
Not applicable
424 Views
14 Replies
Message 1 of 15

Pause Symbol

Anonymous
Not applicable
From the Visual Basic help files of VB Design
http://vbdesign.hypermart.net/cadpages/

Hi Tom,
Without seeing the code you have so far, I offer you this:

ThisDrawing.Utility.GetAngle

This will allow the user to enter a number at the command line or pick on
the screen (and it will "pause" code execution until it gets the value)

Randall Rath
VB Design
0 Likes
425 Views
14 Replies
Replies (14)
Message 2 of 15

Anonymous
Not applicable
Someone here wrote a Lisp routine that looks something like this:

(defun C:Curbs ()
(defun CURBR ()
(command "insert" "TCBCR" insp (getvar "ltscale") "" pause (rtos
TC)
(rtos BC) (princ)
)
;; Begin Main Program
;;Stuff here to get ins pt , desc info, elev etc & calc TC & BC
values

call CURBR
(princ)
)

I can do everything in VBA except the pause to allow the user to specify
an arbitrary rotation. Is there a way to do this in VBA (A2k - LDD2)?

Thanks - Tom
0 Likes
Message 3 of 15

Anonymous
Not applicable
Randall,
Here's the code.

Private Sub insertBlock(blkName As String)
Dim oInsPt As Variant 'User selected insertion point
Dim vAttributes As Variant 'Insertion Block Attributes
Dim vScale As Variant
Dim oBlock As AcadBlockReference
Dim oLine As AcadLine

On Error Resume Next

vScale = ThisDrawing.GetVariable("ltscale")
Me.Hide
oInsPt = ThisDrawing.Utility.GetPoint(, vbCr & "Select Insertion
Point: ")
If Err.Number = 0 Then
Set oBlock = ThisDrawing.ModelSpace.insertBlock(oInsPt, blkName,
vScale, vScale, 1, 0)
vAttributes = oBlock.GetAttributes
vAttributes(0).TextString = txtTop.Text
vAttributes(1).TextString = TxtBottom.Text
Set oLine = ThisDrawing.ModelSpace.AddLine(TB_Curbs.oPt, oInsPt)
End If

Set oInsPt = Nothing
Set vAttributes = Nothing
Set vScale = Nothing
Set oBlock = Nothing
Set oLine = Nothing
End Sub

I can't see a way of interrupting Set oBlock in order to get user
input. There is some mention in the Help about using the \
character with macros but I couldn't make that work either.

- Tom

Randall Rath wrote in message
news:88rq2d$pko9@adesknews2.autodesk.com...
> From the Visual Basic help files of VB Design
> http://vbdesign.hypermart.net/cadpages/
>
> Hi Tom,
> Without seeing the code you have so far, I offer you this:
>
> ThisDrawing.Utility.GetAngle
0 Likes
Message 4 of 15

Anonymous
Not applicable
Hi Frank,
I covered all of the system variables for R15 sometime ago..I think it was
last October. If you look in the A.C.A.D. Archives you can find a complete
documentation with sample code for each.
I love the name on that one

Randall Rath
0 Likes
Message 5 of 15

Anonymous
Not applicable
Hi Frank,
Marie handles all of that stuff now, she must not have read my sticky note!
If you are still not getting the letter I suggest you re-subscribe,

http://vbdesign.hypermart.net/cadpages/a_code_a_day_acad.htm

that way it will go directly to the boss.

Randall
0 Likes
Message 6 of 15

Anonymous
Not applicable
Speaking of which, have you stopped cranking out A.C.A.D. or have you just
lost my address due to my ISP Shuffle?

--
Visit me at: http://www2.stonemedia.com/franko

"Randall Rath" wrote in message
news:88s2f4$pl233@adesknews2.autodesk.com...
> Hi Frank,
> I covered all of the system variables for R15 sometime ago..I think it was
> last October. If you look in the A.C.A.D. Archives you can find a
complete
> documentation with sample code for each.
> I love the name on that one
>
> Randall Rath
>
>
0 Likes
Message 7 of 15

Anonymous
Not applicable
Hi Tom,
Is there any reason why you can't retrieve the value prior to that line?

Randall Rath
VB Design
0 Likes
Message 8 of 15

Anonymous
Not applicable
Randall,
Works like a champ. Of course, I'll get some blank stares from the users
because the won't see the actual block being highlighted. They'll have
to just get used to it.

One more question if you don't mind. I see the following on the command
history:

Pick a Point:
Command: Select Insertion Point:
Command: Select Rotation:
Command: Duplicate definition of block ADCADD_ZZ ignored.
Pick a Point: *Cancel*

Is there a way to suppress the Duplicate Definition message? As you can
tell, I'm still in AutoCad 101.

Thanks - Tom

Randall Rath wrote in message
news:88rro0$pkp11@adesknews2.autodesk.com...
> Hi Tom,
> Is there any reason why you can't retrieve the value prior to that
line?
>
> Randall Rath
> VB Design
>
>
0 Likes
Message 9 of 15

Anonymous
Not applicable
Hi Tom,
Change the value of the system variable NOMUTT (yes that is the real name)
to 1

This will supress messages to the command line, just be sure to return it to
its normal state when you are done!

Randall Rath
VB Design
0 Likes
Message 9 of 15

Anonymous
Not applicable
You can also use the SendCommand with the insert. You need to quote all
commands. This example inserts the block and you can see it while you
rotate it.

Sub vbinsert()
Dim strTest As String
Dim strIns As String

' strTest id a block in the drawing to insert
strTest = "recp"

strIns = "(command " & """-insert"" " & """" & strTest & """" & " pause
" _
& """1.0""" & " """") " & vbCr

ThisDrawing.SendCommand strIns

End Sub

Hope this works.

Bill Brookman
bb@brookmangroup.com

Tom Gilmer wrote in message
news:88rvag$plh17@adesknews2.autodesk.com...
> Randall,
> Works like a champ. Of course, I'll get some blank stares from the users
> because the won't see the actual block being highlighted. They'll have
> to just get used to it.
>
> One more question if you don't mind. I see the following on the command
> history:
>
> Pick a Point:
> Command: Select Insertion Point:
> Command: Select Rotation:
> Command: Duplicate definition of block ADCADD_ZZ ignored.
> Pick a Point: *Cancel*
>
> Is there a way to suppress the Duplicate Definition message? As you can
> tell, I'm still in AutoCad 101.
>
> Thanks - Tom
>
> Randall Rath wrote in message
> news:88rro0$pkp11@adesknews2.autodesk.com...
> > Hi Tom,
> > Is there any reason why you can't retrieve the value prior to that
> line?
> >
> > Randall Rath
> > VB Design
> >
> >
>
>
0 Likes
Message 11 of 15

Anonymous
Not applicable
Where did you ever come across that one???

--
Visit me at: http://www2.stonemedia.com/franko

"Randall Rath" wrote in message
news:88s1pt$pli41@adesknews2.autodesk.com...
> Hi Tom,
> Change the value of the system variable NOMUTT (yes that is the real name)
> to 1
>
> This will supress messages to the command line, just be sure to return it
to
> its normal state when you are done!
0 Likes
Message 11 of 15

Anonymous
Not applicable
Randall,
Thanks for all your help. I've doing a lot of muttering these days.

- Tom

Randall Rath wrote in message
news:88s1pt$pli41@adesknews2.autodesk.com...
> Hi Tom,
> Change the value of the system variable NOMUTT (yes that is the real
name)
> to 1
0 Likes
Message 11 of 15

Anonymous
Not applicable
Bill,
I'll try it as soon as I get a chance. I'll let you know how it went

Thanks - Tom

Bill Brookman wrote in message
news:88s0ls$plg22@adesknews2.autodesk.com...
> You can also use the SendCommand with the insert. You need to quote
all
> commands. This example inserts the block and you can see it while you
> rotate it.
0 Likes
Message 14 of 15

Anonymous
Not applicable
Credit where credit due.

I do believe this was first documented by Owen Wengerd.

http://www.manusoft.com/acadexp.htm#SysVars

__________________________________

Michael Puckett
programmer@cadvision.com
> Not < an Autodesk hall monitor.
Imagination makes all things possible.
__________________________________

"Frank Oquendo" wrote in message
news:88s223$pko26@adesknews2.autodesk.com...
Where did you ever come across that one???

--
Visit me at: http://www2.stonemedia.com/franko

"Randall Rath" wrote in message
news:88s1pt$pli41@adesknews2.autodesk.com...
> Hi Tom,
> Change the value of the system variable NOMUTT (yes that is the real name)
> to 1
>
> This will supress messages to the command line, just be sure to return it
to
> its normal state when you are done!
0 Likes
Message 14 of 15

Anonymous
Not applicable
Frank, just so you know, MDT4 does not fully honor NoMutt...


--
R. Robert Bell, MCSE
Network Administrator (or, Modern-day Wizard)
(remove the "not." in my address for direct e-mail)

Frank Oquendo wrote in message
news:88s223$pko26@adesknews2.autodesk.com...
> Where did you ever come across that one???
0 Likes