Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A challenge

0 views
Skip to first unread message

RANDY

unread,
Oct 4, 2002, 8:46:28 AM10/4/02
to
I am trying to automate our machining sheets

I have a block that I wish to insert x number of times
The trick though is this
1)..I need to pick the start point and end point of a line
2)..Side of offset
3)..Enter the number of blocks to be inserted
4)..The blocks to be inserted have to
a) be (32..64..96mm..etc) apart
b) no less than 3" from either end of the line
c) centered on the line

Autocad2002

I know it sounds confusing and a lot of requirements but I know it can be
done
p.s. These machining sheets are for placing cam holes

Thanks,
Randy


Mark

unread,
Oct 4, 2002, 8:54:24 AM10/4/02
to

this is not a free programming ng,


"RANDY" <RBIL...@PREFERREDMFG.COM> wrote in message
news:9DFD0957A47BC23F...@in.WebX.maYIadrTaRb...

RANDY

unread,
Oct 4, 2002, 9:04:04 AM10/4/02
to
I'm just hoping for some direction
What I'm hung up on is the calution for the diffrent 32mm increments

PS It can't hurt to ask

"Mark" <ma...@ruys.com> wrote in message
news:F5B629389872D90B...@in.WebX.maYIadrTaRb...

Mark

unread,
Oct 4, 2002, 9:26:53 AM10/4/02
to

draw a line from the start to end point offset it
and then use the (vlax-curve-... A2k2 functions
they are magical...

mark


"RANDY" <RBIL...@PREFERREDMFG.COM> wrote in message

news:9F48A02CD03E650E...@in.WebX.maYIadrTaRb...

Terry W. Dotson

unread,
Oct 4, 2002, 11:34:17 AM10/4/02
to
Mark wrote:

> and then use the (vlax-curve-... A2k2 functions
> they are magical...

Yes, thanks to the Basis boys!

Terry

Joe Melton

unread,
Oct 4, 2002, 11:57:07 AM10/4/02
to
Randy, you'll probably get more courteous replies in the ADT customization
newsgroup. autodesk.aec.arch-desktop.customization
Those guys are very helpful, and I haven't seen any snide remarks like I
just saw here.


"Terry W. Dotson" <twdo...@dotsoft.com> wrote in message
news:3D9DB4F9...@dotsoft.com...

Doug Broad

unread,
Oct 4, 2002, 12:29:23 PM10/4/02
to
Joe,
Oh yeah that's real helpful. Send him to ADT with a question that
has nothing to do with ADT so the moderator can chase him away.

Without reading too much into Randy's original post, it appeared
he was daring someone to write something that met his specs rather
than asking for help.

He probably would have gotten better responses with a more
polite and appropriate subject line.

Randy,
Try doing what you want manually and record the steps you take.
Your "challenge" sounds like something that could easily be
done with the OFFSET and DIVIDE command (using the block option).

After you do it manually, try coding something yourself and then
come back for help (suggest in another thread). :-)

Regards,
Doug


"Joe Melton" <joem...@pdceng.com> wrote in message
news:F5E7B1795A1000F1...@in.WebX.maYIadrTaRb...


> Randy, you'll probably get more courteous replies in the ADT customization
> newsgroup. autodesk.aec.arch-desktop.customization
> Those guys are very helpful, and I haven't seen any snide remarks like I
> just saw here.
>

<snip>


Terry W. Dotson

unread,
Oct 4, 2002, 2:03:33 PM10/4/02
to
Joe Melton wrote:

> Randy, you'll probably get more courteous replies ...

... and you don't have a clue what I'm talking about.

Terry

Joe Melton

unread,
Oct 4, 2002, 1:54:39 PM10/4/02
to
Actually, Doug, there are many customization topics in the ADT customization
newsgroup that could just as well be posted in this group. Overall, the
people in there are customization people. If ADT runs on top of AutoCAD
(which it does), and a customization topic comes up in that newsgroup that
has more to do with AutoCAD than with ADT specifically, usually somebody
will answer the question regardless. So I'm just helping Randy out since he
came here for help, not to listen to trolls.


"Doug Broad" <dbr...@nash.cc.nc.us> wrote in message
news:4F74622C3A042D29...@in.WebX.maYIadrTaRb...

Joe Melton

unread,
Oct 4, 2002, 2:03:34 PM10/4/02
to
Nope. I would be speaking of those who say this:

"this is not a free programming ng"

That pretty much sums up a troll.


"Frank Oquendo" <frankoatacadxdotcom> wrote in message
news:CCC7F43A165C98A5...@in.WebX.maYIadrTaRb...
> Joe Melton had this to say
> :


> > So I'm just helping Randy out since he came here for
> > help, not to listen to trolls.
>

> Did you just call Terry Dotson a troll?
>
> --
> There are 10 kinds of people:
> Those who understand binary and those who don't
> http://www.acadx.com
>
>
>
>


Frank Oquendo

unread,
Oct 4, 2002, 2:01:06 PM10/4/02
to
Joe Melton had this to say
:
> So I'm just helping Randy out since he came here for
> help, not to listen to trolls.

Did you just call Terry Dotson a troll?

Frank Oquendo

unread,
Oct 4, 2002, 3:36:55 PM10/4/02
to
Joe Melton had this to say
:
> "this is not a free programming ng"
>
> That pretty much sums up a troll.

It could just be a terse response to a request for free labor.

Doug Broad

unread,
Oct 4, 2002, 4:59:31 PM10/4/02
to
Joe,

Would it not perhaps have been more "helpful" to have contributed
some code yourself perhaps rather than presuming that the poster
was being mistreated rather than being gently chided for the imperial
tone of his posted *challenge*.

Looking back, I couldn't find an instance of your "helping" someone
on this newsgroup. If you are a newcomer and want to dig in and
help others, then you aren't starting out too well.

Please stay and help but avoid personal attacks ( "Troll?" <Bwahaha>)

Doug


<snip>


RANDY

unread,
Oct 4, 2002, 5:06:43 PM10/4/02
to
Hey all..

I only meant it is going to be a challenge for me since I have no clue as to
where to begin.
I've got a couple of VBA or lisp ideas, and I am looking into an excell
function called mround.

Randy


Joe Melton

unread,
Oct 4, 2002, 5:35:22 PM10/4/02
to
That would probably be because you only searched THIS newsgroup. =)


"Doug Broad" <dbr...@earthlink.net> wrote in message
news:4E7F1053892ABB85...@in.WebX.maYIadrTaRb...

Joe Burke

unread,
Oct 4, 2002, 6:48:20 PM10/4/02
to
troll: noun, Scandinavian folklore, any of a race of supernatural beings...
;-)

R. Robert Bell

unread,
Oct 4, 2002, 9:05:05 PM10/4/02
to
Post what you have so far. I would be happy to help you further.

--
R. Robert Bell, MCSE
www.AcadX.com

RANDY

unread,
Oct 7, 2002, 5:11:25 PM10/7/02
to
This is what i've got so far all from the help section and CAD's Vba
samples
It still needs some work but its getting there
Randy

If you've got some suggestion's I'd love to here them
(P.S. This is my first)

sub CalculateDistance()
Dim point1 As Variant
Dim point2 As Variant


' Get the points from the user
point1 = ThisDrawing.Utility.GetPoint _
(, vbCrLf & "First point: ")
point2 = ThisDrawing.Utility.GetPoint _
(point1, vbCrLf & "Second point: ")

' Calculate the distance between point1 and point2
Dim x As Double, y As Double, z As Double
Dim dist As Double
x = point1(0) - point2(0)
y = point1(1) - point2(1)
z = point1(2) - point2(2)
dist = Sqr((Sqr((x ^ 2) + (y ^ 2)) ^ 2) + (z ^ 2))

'Display the resulting distance
Dim distmm As Double
distmm = ((dist - 6) * 25.4)
MsgBox "The distance in mm (minus 6 in)between the points is: " _
& distmm

'qty of cams
Dim cams As Integer
cams = ThisDrawing.Utility.GetInteger("num of cams: ")


'calculate
Dim lenperqty As Integer
Dim spacing As Integer
lenperqty = (distmm / cams)
spacing = Int(lenperqty / 32) * 32
MsgBox "spaceing: " & spacing


ThisDrawing.Utility.InitializeUserInput 6, "24 34"
Dim promptStr As String
promptStr = vbCrLf & "Enter the size or (24/34/<34>):"

On Error Resume Next

Dim returnInteger As Integer
returnInteger = ThisDrawing.Utility.GetInteger(promptStr)

If Err.Description = "User input is a keyword" Then
Dim returnString As String
returnString = ThisDrawing.Utility.GetInput()
Err.Clear
Else
If returnInteger = "" Then 'If user pressed ENTER
returnString = "34" 'Set to default
Else 'Otherwise,
returnString = returnInteger
End If
End If

' insert the result
Dim path34 As String
Dim path24 As String
Dim blockRefObj As AcadBlockReference

If returnString = "34" Then
path34 = "H:\0blocks\HARDWARE\15mmcam34.dwg"
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(point1,
"15mmcam34.dwg", 1#, 1#, 1#, 0)
Dim cam34 As Variant
cam34 = blockRefObj.ArrayRectangular(1, cams, 1, 0#, (spacing /
24.5), 0#)
End If

End Sub


0 new messages