Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Matt W
Message 1 of 5 (155 Views)

Copy block to multiple layout tabs

155 Views, 4 Replies
02-17-2006 01:58 PM
Does anyone have a nugget of code that will copy a selected block to
multiple layout tabs (preferably without having to switch to each tab)??

I can do it using COPYBASE (which might be kind of a hack way of doing it)
and cycling through the various CTABs, but I would LIKE to be able to do it
magically without switching to each tab first.

Anyone have anything like this kicking around he/she would like to share or
could possibly point me in the right direction??

Thanks in advance!

--
Matt W
"I did absolutely nothing, and it was everything I thought it could be."
*T.Willey
Message 2 of 5 (155 Views)

Re: Copy block to multiple layout tabs

02-17-2006 02:03 PM in reply to: *Matt W
You could use the InsertBlock method of the layout block object.

--

Tim
"A blind man lets nothing block his vision."



"Matt W" wrote in message
news:5090152@discussion.autodesk.com...
Does anyone have a nugget of code that will copy a selected block to
multiple layout tabs (preferably without having to switch to each tab)??

I can do it using COPYBASE (which might be kind of a hack way of doing it)
and cycling through the various CTABs, but I would LIKE to be able to do it
magically without switching to each tab first.

Anyone have anything like this kicking around he/she would like to share or
could possibly point me in the right direction??

Thanks in advance!

--
Matt W
"I did absolutely nothing, and it was everything I thought it could be."
*Matt W
Message 3 of 5 (155 Views)

Re: Copy block to multiple layout tabs

02-21-2006 06:16 AM in reply to: *Matt W
I'm not sure I follow you - I'm not too familiar with VLISP, but this is
what I came up with VBA (doesn't work though).

Public Sub Main()
Dim objSpace As AcadPaperSpace
Dim insertionPnt(0 To 2) As Double
Dim blockRefObj As AcadBlockReference

insertionPnt(0) = 0#: insertionPnt(1) = 0#: insertionPnt(2) = 0#

Set blockRefObj = objSpace.InsertBlock(insertionPnt, "CircleBlock", 1#,
1#, 1#, 0)
End Sub

--
Matt W
"I did absolutely nothing, and it was everything I thought it could be."
*T.Willey
Message 4 of 5 (155 Views)

Re: Copy block to multiple layout tabs

02-21-2006 08:20 AM in reply to: *Matt W
I know it lisp you have to have the insertion point, scale factors, and
rotation in doubles. So this worked for me, where psp is a variable for
paper space.
(vlax-invoke psp 'InsertBlock '(0.0 0.0 0.0) "CIR-NOTE" 1.0 1.0 1.0 0.0)

--

Tim
"A blind man lets nothing block his vision."



"Matt W" wrote in message
news:5091786@discussion.autodesk.com...
I'm not sure I follow you - I'm not too familiar with VLISP, but this is
what I came up with VBA (doesn't work though).

Public Sub Main()
Dim objSpace As AcadPaperSpace
Dim insertionPnt(0 To 2) As Double
Dim blockRefObj As AcadBlockReference

insertionPnt(0) = 0#: insertionPnt(1) = 0#: insertionPnt(2) = 0#

Set blockRefObj = objSpace.InsertBlock(insertionPnt, "CircleBlock", 1#,
1#, 1#, 0)
End Sub

--
Matt W
"I did absolutely nothing, and it was everything I thought it could be."
Member
jgasparilla
Posts: 5
Registered: ‎07-08-2005
Message 5 of 5 (155 Views)

Re: Copy block to multiple layout tabs

09-08-2006 08:00 AM in reply to: *Matt W
does anyone have a lisp that accomplishes this? I am looking to copy something to multiple tabs, not have to open each one and paste.
thanks
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 or visit the Installation and Licensing Forum to get help installing your software.