block rotation

block rotation

Anonymous
Not applicable
281 Views
2 Replies
Message 1 of 3

block rotation

Anonymous
Not applicable
I would like to prompt the user to select an area with a window and then find all the block entities of a certain type (block name) in the window.
I want to rotate the blocks by various angles

Thank You
Jack
0 Likes
282 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Jackcracker,

this should allow you to select onscreen a group of blocks, it then will
scale each by its insertion point and rotate by 45

Hope this helps


Option Explicit

Sub ad_GetBlocks()
Dim fType(0) As Integer, fData(0)
Dim adBlockSS As AcadSelectionSet
Dim adBlock As AcadBlockReference
Dim i As Integer

On Error Resume Next
Set adBlockSS = ThisDrawing.SelectionSets("adBlockSS")
If Err Then Set adBlockSS = ThisDrawing.SelectionSets.Add("adBlockSS")
adBlockSS.Clear

adBlockSS.SelectOnScreen
fType(0) = 0: fData(0) = "INSERT"
For Each adBlock In adBlockSS

adBlock.ScaleEntity (adBlock.InsertionPoint), 5
adBlock.Rotate (adBlock.InsertionPoint), 45

Next adBlock
Update

adBlockSS.Clear
End Sub









wrote in message news:5790130@discussion.autodesk.com...
I would like to prompt the user to select an area with a window and then
find all the block entities of a certain type (block name) in the window.
I want to rotate the blocks by various angles

Thank You
Jack
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thank you very much. This seems to be what I need

Jack
0 Likes