Visual Basic Customization

Reply
*jerry.toy
Message 1 of 3 (52 Views)

Insert block question

52 Views, 2 Replies
04-03-2003 01:57 AM
I'm new to VB programming in Autocad. Here's what I'd like to do.

Say I have 3 groups of blocks(.dwg files)
Group 1: 1a.dwg, 1b.dwg
Group 2: 2a.dwg, 2b.dwg
Group 3: 3a.dwg, 3b.dwg

I want to have a dialog box that I can select 1 block from each group and
have it insert all of them at 0,0 and 1:1 scale. I have the dialog box but
can't figure out how to insert the blocks that I select.

--
J_Toy
*Wilder, Jason
Message 2 of 3 (52 Views)

Re: Insert block question

04-03-2003 02:00 AM in reply to: *jerry.toy
J_Toy,

Here is a snipet of code I use, I think it'll give you the idea. I use this
for details that I insert into my detail sheets. I mainly got it out of the
help refernences in the VBA IDE help.


Dim detInsPt(0 To 2) As Double
Dim detName As String
detInsPt(0) = 0#
detInsPt(1) = 0#
detInsPt(2) = 0#
detName = detDir + lstbxDtl.Text
Set detBlock = ThisDrawing.ModelSpace.InsertBlock(detInsPt, detName, 1#,
1#, 1#, 0)

Obviously you'll have to substitute in your method for the blockname
(detName variable in my case).

HTH


wrote in message
news:943D97BFCE6B335F4EE75D85902473C4@in.WebX.maYIadrTaRb...
> I'm new to VB programming in Autocad. Here's what I'd like to do.
>
> Say I have 3 groups of blocks(.dwg files)
> Group 1: 1a.dwg, 1b.dwg
> Group 2: 2a.dwg, 2b.dwg
> Group 3: 3a.dwg, 3b.dwg
>
> I want to have a dialog box that I can select 1 block from each group and
> have it insert all of them at 0,0 and 1:1 scale. I have the dialog box
but
> can't figure out how to insert the blocks that I select.
>
> --
> J_Toy
>
>
>
*jerry.toy
Message 3 of 3 (52 Views)

Re:

04-03-2003 05:14 AM in reply to: *jerry.toy
Thanks Jason,

That worked. It took a little while to figure out the radio buttons but
it works.

Thanks for you help.

--
J_Toy


"Jason Wilder" wrote in message
news:F401143C4AB3C33523B305F0D6C5877E@in.WebX.maYIadrTaRb...
> J_Toy,
>
> Here is a snipet of code I use, I think it'll give you the idea. I use
this
> for details that I insert into my detail sheets. I mainly got it out of
the
> help refernences in the VBA IDE help.
>
>
> Dim detInsPt(0 To 2) As Double
> Dim detName As String
> detInsPt(0) = 0#
> detInsPt(1) = 0#
> detInsPt(2) = 0#
> detName = detDir + lstbxDtl.Text
> Set detBlock = ThisDrawing.ModelSpace.InsertBlock(detInsPt, detName,
1#,
> 1#, 1#, 0)
>
> Obviously you'll have to substitute in your method for the blockname
> (detName variable in my case).
>
> HTH
>
>
> wrote in message
> news:943D97BFCE6B335F4EE75D85902473C4@in.WebX.maYIadrTaRb...
> > I'm new to VB programming in Autocad. Here's what I'd like to do.
> >
> > Say I have 3 groups of blocks(.dwg files)
> > Group 1: 1a.dwg, 1b.dwg
> > Group 2: 2a.dwg, 2b.dwg
> > Group 3: 3a.dwg, 3b.dwg
> >
> > I want to have a dialog box that I can select 1 block from each group
and
> > have it insert all of them at 0,0 and 1:1 scale. I have the dialog box
> but
> > can't figure out how to insert the blocks that I select.
> >
> > --
> > J_Toy
> >
> >
> >
>
>

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community