.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Match block orientating to layout

2 REPLIES 2
Reply
Message 1 of 3
gerritvandiepen
604 Views, 2 Replies

Match block orientating to layout

In AutoCAD it is possible to set the orientating of a block to the orientating of the layout.

This can be done to run the " block" command, select the block to change, and and activate " Annotative"  and " Match block orientating to layout"

 

For example, you may want to have a block presenting the locating of an elevator automatically orientated to every layout.

In a layout with a rotated viewport by 90 degrees, all the elevator blocks are shown according the layout.

 

Is it possible to set the block orientating to match the layout in .NET ?

 

Is it possible to set the block orientating to match the layout even the block is not annotative?

 

Any example in C# or vb.NET would be fine

2 REPLIES 2
Message 2 of 3
arcticad
in reply to: gerritvandiepen

http://www.theswamp.org/index.php?topic=39544.0

---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 3 of 3
gerritvandiepen
in reply to: arcticad

Thanks it works

But you have to be sure that the block is allready an annotative block

 

Otherwise you have to set it first:

 

Dim btr As BlockTableRecord = trx.GetObject(bt(sBlockName), OpenMode.ForRead)
    
If btr.PaperOrientation <> bAllignToLayout Then 
        btr.UpgradeOpen()
        btr.Annotative = 0  '  first annotative state (default)
        btr.SetPaperOrientation(bAllignToLayout)

end if

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost