Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Copy block to multiple layout tabs

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
488 Views, 4 Replies

Copy block to multiple layout tabs

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."
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

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."
Message 3 of 5
Anonymous
in reply to: Anonymous

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."
Message 4 of 5
Anonymous
in reply to: Anonymous

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."
Message 5 of 5
jgasparilla
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost