I am trying to write a method that takes a block in a drawing through block references and spreads it . So far, my method looks like this:
Public static zero section BracketWithID (ObjectID PASADED ODOF ObjectToUpdate, Distance Newx Scale, Distance NewIscale, Distance News Escale) {Transaction Transaction = Database. Transaction Manager BlockReference (DocumentLock docLock = doc.LockDocument ()) using the start-up process ()) {BlockReference objectToStretch = transaction.GetObject (BlockedEdOfObjectToUpdate, OpenMode.ForWrite); Transaction.Commit (); }}
I get the object to stretch in the context of the block, but it does not appear to change the block anyway, so that it is wide and / or more (I use 2D Aeroplane). What is the best way to go about doing this?
You can not "block" the block reference You need either 1 to change its size. Redefine the block (definition) or 2. Change the blockrifference scalefactors property. Changing scale fronts can not give you the results you are looking for. One way to see this is to make a block, put it in an AutoCAD drawing, and then play with the scale X, Y and Z in the property editor.
No comments:
Post a Comment