AutoCAD .NET :: Block With Attributes Scaling?
Nov 29, 2012
I'm trying to make some command which allows me to easily scale blocks.
I've this
BlockReference br = (BlockReference)obj as BlockReference; br.ScaleFactors = new Scale3d(0.5, 0.5, 1);
Everything is ok, lines, circles, etc. in block are scalling correctly.
But I have problem with attributes (look at the image) - attributes are not scaling and their position are not correct.
Simple command ("scale") is working OK
View 1 Replies
ADVERTISEMENT
Jun 4, 2013
How can i scale a block have some attributes , with known factor ?
View 3 Replies
View Related
Jan 7, 2012
I was just notified I am supposed to show a small class how to make our company title blocks using attributes and what annotative scaling is and how to use it. videos or related forums so I can set up something to show tomorrow morning. We are going to be setting up our block library and setting up our title blocks. Should this be done using templates for each paper size?
View 2 Replies
View Related
Jan 23, 2012
From the attached image you can see what I'm talking about.
(left=original, middle=ROTATE, right=PROPERTIES)
When I rotate blocks using ROTATE command everything is fine, but when I rotate blocks using PROPERTIES my attributes get messed.
I need to rotate several blocks at once with PROPERTIES, because I don't have time to rotate each one separately.
The same thing happens when scaling blocks, but this was resolved using the command BSCALE in the command line.
View 5 Replies
View Related
Feb 14, 2013
Is there a way to create a block with attributtes that automatically complete x, y, z, lat, long for the insertion point of the block?
I am trying to complete text in paperspace that will automatically fill in the lat long of a point in model space without using a table. I have tried field insertion with reference to a cogo point, but it doesn't give options for position on a cogo point. If I pick a block with attributes, it will let me pick any attributes, and x,y position for the block.
Cogo points show all the information I need to propagate in the properties....but how do I get that to translate into the text using fields or some other method?
Dell Precision T3600 - Windows 7 64-bit
NVIDIA Quadro 600
Intel(R) Xenon(R) CPU E5-1607 0 @ 3.00GHz 3.00GHz
8 GB ram - Two 1TB raid
View 9 Replies
View Related
Oct 26, 2012
When the block is in a drawing and I click it, it takes me to block editor.
However if I go to it in block editor and test block it allows me to change the attributes.
Why does clicking the block go to block editor and not allow me to change its attributes as it does when I test block.
View 9 Replies
View Related
Oct 31, 2013
I would like to change sub block from a visibility after setting it. Here an example of code to get the right visibility, I don't really know how to update a sub block by name or by handle(seems to change inside dynamic block).
Dim Block As AcadBlock
Dim BlockRef As AcadBlockReference
Dim DynEntBlock As AcadEntity
Dim DynObjRefH As IAcadBlockReference
[Code]........
View 9 Replies
View Related
Apr 8, 2013
I can insert a block with block attributes using the Inter op very easily:
Dim theBlock AsAcadBlockReference
Dim pickScreenVBA = myDoc.Utility.GetPoint(, "insert the hydrant")
theBlock = myDoc.ModelSpace.InsertBlock(pickScreenVBA, "Hydrant", 1.0#, 1.0#, 1.0#, 0)
Dim varAttributes AsObject
varAttributes = theBlock.GetAttributes
varAttributes(0).TextString ="3 Ports"
varAttributes(1).TextString ="Salt water"
Works great, but when I try using the non-inter op, all the example insert new Attributes and not add block with existing attribute (so I end up with duplicate attributes for each block - i.e "Salt water" attribute is added to the block each time I run the code),
Are they any examples that does the same as above using the non-interop code?
View 2 Replies
View Related
Dec 12, 2013
I'm trying to add some attributes to an existing block using the block editor, but after I save and close it I cannot see any 'placeholders' despite adding a default value and the attributes work fine when I double click the block.
I've tried using the ATTSYNC and BATTMAN commands but nothing works and there are no invisibility states applied to either the attribute or block and all layers are switched on.
I just tried making a quick block from scratch and it seems to have the same affect, except the default value will show, but no 'placeholder' shown if left blank.
I swear with previous version I could see the tag when a value hadn't been applied, so is it that the version I now use (2012) does not have this feature or it's disabled?
View 9 Replies
View Related
Apr 20, 2013
How can I determine if a placed image is scaled, and by what percentage?
View 9 Replies
View Related
Sep 19, 2011
I'm trying to chnage the text of the sheet number and total sheet number attributes for each layout in my drawing. I have code that adds and deletes the specified pages, now I need to edit the attributes to reflect the correct page and correct total amount of pages. Here is my code, based on my old VBA version.
I know there is a problem with the line:
For Each item In myBTR.ObjectId
I've used a number of websites and books, but I would really like to find something that teaches about block tables, block table references, block table IDs so I can get a better understanding of breaking stuff down to get the info I need.
Public Sub updatePageNumbers()
Dim myDWG As Autodesk.AutoCAD.ApplicationServices.Document
Dim myDB As Autodesk.AutoCAD.DatabaseServices.Database
Dim myTransManForPageNumbers As Autodesk.AutoCAD.DatabaseServices.TransactionManager
Dim myTransForPageNumbers As Transaction
[Code]....
View 6 Replies
View Related
Nov 9, 2011
We are having some issues with title block scaling when importing them from the design center. Some people have this problem whilst others have had no problem at all or only in the past and this has since stopped.
Layout Template.jpg
The image above shows an example of the problem. The Layout basically appears 25.4 times larger than the paper itself (the paper is at the bottom left). This would indicate something is wrong with the insertion scale.
The drawing containing the title blocks is in millimeters and the drawings which it is being inserted to are in a mixture of millimeters, inches, or unitless. I have checked the insertion scale settings within options and both Source and Target units are set to millimeters for users that have this problem and users that don't.
I know a quick fix is to just select that block and scale it by 0.03937 (1/25.4).
View 7 Replies
View Related
Dec 13, 2012
using AutoCAD 2009 (vanilla)
I got too smart for myself today in bringing an old drawing up to current standards...Everyone seems to want their block attributes to be zero - I have blocks where the attributes are best when they match the rotations of each blocks.
I have an old drawing that was rotated (as it should be) at approx 2deg.
I used a lisp routine to global edit all the blocks that needed to be at zero. BUT for some reason (and after hundreds of blocks were corrected), I noticed I now have two blocks that should NOT have been in the set have had their attributes rotated to zero....and the attributes should be at the same rotation as their block's rotation.
Because those two blocks have a fixed tic mark, I can click on the mark to see what the block rotation is, then rotate its attribute to that rotation, but I have hundreds of blocks! One-at-a-time sucks....
Any chance there is a GLOBAL way to edit an attribute rotation to match its own block's rotation?
View 2 Replies
View Related
Jun 27, 2013
I have two "drawing title" lines in my block when I use the, stretch, move, scale parameter the attributes lose the position (the drawing titles lines are stacked) and will not scale with the rest of the objects. I tried all tricks that I could possibly think of but no success.
maybe LT2012 has a bug that does not allow me do this correctly?
LT 2012 User
Windows 7 professional
View 8 Replies
View Related
May 14, 2012
I'm setting up CAD standards for my office (title blocks, tool palletes, dynamic blocks, you know the drill). This should have been done long ago by another employee who makes more money than me, but that is beside the point. (Maybe you know the drill on that front too...)
This is a granite counter top fabrication shop, and I've created a dynamic block containing all the edging profiles we are producing at the moment. Contained in the block are "3D" versions of each profile, both with and without dimensions (for annotation purposes), and a 2D closed polyline showing only the "section" of the profile, to be exploded from the block and used as an extrusion shape when 3D drawings of the finished look of a countertop are necessary.
The issue I'm having is with scaling/annotative scaling. I have created a custom tool pallete with this edge profile block and a couple other dynamic "mark-up" blocks. (See Layout1 in the attached drawing.) What I need is for this edge profile block to insert into model space at "actual size" (3/4" thick), so when it is exploded and extruded, I'm creating that 3D edge at the proper proportion in my drawing. But for annotative purposes, I want to be able to insert the block at a different scale in paperspace (roughly at the size it is shown in the attached drawing).
CRYSTAL_TEPLATE01.dwg
View 9 Replies
View Related
Apr 23, 2012
I have about 10 instrumentation enlarged plans that are drawing in model space and all the equipment text and instrument bubbles and blocks are in paper space.
All of the drawings are at 1/4" but they are getting loaded down with too much info, so we are cutting each of them into twenty drawings instead of ten. While I can change the view port very easily and scale it up accordingly, after I do that I will have to re arrange the text and blocks. I'm looking for a way to scale the blocks and text in a way to where it will change the location of the text and blocks, without actually changing the size. So I bring the drawings up from 1/4" = 1'-0" to 1/2" = 1'-0". If I scale all of the blocks up by 2, it will put them in the right location, but all of the text and blocks will be too large. I could select them all and change their scale down in the property palette, but I would still have to trim down all of the leader lines going from the instruments to their bubbles.
Long story short, is there a way to scale a block or text from a basepoint to where if you scale it, it will change it's location, but not the scale of the block or text?
View 7 Replies
View Related
Mar 17, 2011
We have recently revised our drawing practices which has resulted in most of our electrical symbols being twice as large as they need to be so I am training myself to alter the default scale in the INSERT dialogue box but I get it wrong more often than I get right. In ACADE you can set the default scale in a properties box and all is right with the world.
View 9 Replies
View Related
Feb 17, 2012
I have a profile drawing of a pv module that is a dynamic block. The dynamic block has options to let you select different attachment points. The location of the attachment points and where they attach to the pv module (the rectangle) is a manufacture requirement to maintain the warranty.
I am trying to modify this dynamic block so that I can stretch both the length and the height of the module. The height was the easy part and is working in the attached dwg.
As the length changes the location of the attachment points need to change as well but proportionally to the length. Basically scaling the rectangle but only on one axis.
I have seen references to how when you insert the block you can change the scale factor or once the block has been inserted into the drawing you can set the scale for one axis in the properties menu but is there anyway to do this dynamically?
The pv modules (the rectangle) come in a variety of specific sizes so scaling the block upon insert wouldn't really work anyway.
View 9 Replies
View Related
Oct 16, 2012
I'm scaling a block with increment each 0.5 mm on x and y. But when I get out of the block the size is no longer the same.
Ex: 2,5mm scale gives 2.667mm
3mm --> 3,115, etc.
Hw can I fix it?
View 5 Replies
View Related
May 9, 2013
I have set up a template to A3 - I have amended the page setup to A3 and I have drawn my title block and saved it as a template.
I am now trying to insert the template onto a drawing I have done. I insert the template into a new layout and then do MVIEW to insert my drawing from model space. The problem I am now encountering is that my drawing in MVIEW will no scale correctly. It should scale as 1:100 at A3 as the drawing does before I insert my title block, but when I insert it, I then have to scale at 1:500
View 6 Replies
View Related
Feb 29, 2012
Function ReadDWG(ByVal DWGName As String)
Dim AcadApp As AcadApplication
Dim AcadDoc As AcadDocument
Dim Extracted_title As String RichTextBox1.AppendText(Path.GetFileName(DWGName)) RibbonLabel1.Text = "Opening AutoCAD"
[Code]...
I am using the above code to read block attributes depending on the name. But now I need to read the active drawing (drawing will be open and should read from the active document). In the above code I have referenced interop.dll. without that can I retrieve the block attributes. How to read the block attributes from the active document.
View 2 Replies
View Related
Sep 17, 2012
So I create a block on layer 0 and then create the block as a 1 inch by 1 inch block so it is easy to scale up to the size I need but when I try to insert the block at the scale I need it wont resize it to the correct scale. It stays at the 1 inch by 1 inch original block.
View 1 Replies
View Related
Nov 11, 2013
I have the drawing I'm working on, who's scale is set to "unitless". I'm attempting to insert a series of attributed blocks (containing titleblock information) into the paperspace of my drawing. The attributed block is also set to unitless.
Two of these blocks require editing to suite the drawing, the other two are to be edited at a later date by a third party.
Everything HAD been working fine, however, it appears the wheels have fallen off ~ I'm now experiencing a periodic error where, I insert a block to the 0,0 at a scale of 1 (as per procedure) but the block comes in at a fraction of the correct scale. I have to scale the block up by 25.4. (The imperial / metric conversion.) (Note, I'm working in Metric)
Even stranger - its not happening on all blocks. Just the two that have to be edited "in house".
I've checked measureinit within the blocks and it is set to metric. I'm limited in my ability to purge / audit the drawings as they don't want template information deleted from the drawing - but I don't know what other system variables i should be looking at.
I'm using CivilCad 2012 with Windows 7,
View 3 Replies
View Related
Aug 7, 2013
Using ACAD2014LT. I want to use the first variable attribute value as a variable in subsequent attributes in the same block. This will be extracted and used for tag references in a PLC program.
Along the line, i know I can change the enclosed character ( ' ), but can I remove it?
View 3 Replies
View Related
May 22, 2013
How Can I Get All Block Attributes and change it
View 9 Replies
View Related
Apr 24, 2013
I have this one file .txt with this features:
Point North East Z Description
1 8618063,68 312415,09 75,87 T1
2 8618138,38 312428,89 70,57 B_RIO SECO
3 8618132,23 312427,75 71,90 ARENAL
4 8618126,23 312426,64 72,50 ARENAL
5 8618112,22 312424,06 73,77 ARENAL
6 8618099,78 312421,76 75,35 ARENAL
7 8618089,51 312419,86 75,84 ARENAL
8 8618132,23 312427,75 71,94 J
9 8618112,23 312424,06 73,88 J
10 8618099,82 312421,78 75,36 ARENAL
11 8618089,48 312419,87 75,85 E_1
And I generated this code for read this file and insert one block with attributes for each line of text…..
If txtPath.Text() = "" Then
MsgBox("Select DB .txt.", MsgBoxStyle.Exclamation)
End If
On Error GoTo ControlErroresBD
Dim AcadDocPt As Document =
[Code] ....
‘To the end of this line I can insert the block,,,,,,, but I don’t know how to write the attributes…… I tried with the next code but it doesn’t work…. My bloque has 3 attributes and every tag named with “PN”, “CD” and “CT”
Dim AcadObj As Entity
For Each acObjId As ObjectId In AcadBlockRef.AttributeCollection
AcadObj = AcadTransPt.GetObject(acObjId, OpenMode.ForWrite)
Dim acAttDef As AttributeDefinition = TryCast(AcadObj, AttributeDefinition)
[Code] .....
View 9 Replies
View Related
Apr 20, 2012
I have used the FDO to connect to my SHP files. I have used one data attribute to get a rotation for my blocks. I have also used a feature Label to display the text I am interested in.
When I save to DWG, the feature labels come in as Text. I would like the text to go to the correct block attribute.
Is there a way to do this? I did not see anything in the Style Editor to use my blocks' attributes, only the geometry.
I am aware of using MAPIMPORT to set attributes from the data, but they do not come in rotated, and I have more conditions on which block to use, not just one field to decide the block name.
View 2 Replies
View Related
Mar 15, 2012
I'm trying to edit the attributes in a titleblock using VB.net. The block name is "Titleblock". It is already inserted into a drawing. My program does not need to insert it. It only needs to find the reference, for all layouts, and update a couple attributes for the titleblock on everylayout. I know some of the basics, but get confused with blocktables, and blocktablerecords.
Here is a piece of code I was experimenting with. With this code, I'm trying to get to the attributes, and read an attribute value for a drawing number. It fails when I try to assign a value to the variable blkreftitle.
Dim
doc AsDocument = Application.DocumentManager.MdiActiveDocument
Using docLoc AsDocumentLock = doc.LockDocument
Dim db AsDatabase = HostApplicationServices.WorkingDatabase
[Code]....
View 2 Replies
View Related
May 10, 2011
I have 3 attribute in one block , i made 3 options for visibilty1
so i need in visibilty (1) i can show only the text 11
and i need in visibilty (2) i can show only the text 22
and i need in visibilty (3) i can show only the text 33
View 8 Replies
View Related
Nov 5, 2012
I have a autocad file displaying room layout of a floor. Each room has two blocks. One for displaying the Fixture / Fitment data and second for Room details (Room no, Area).
Is there a way we can merge the two block attributes in a single block with both attributes.
View 1 Replies
View Related
Sep 27, 2011
I need reading the values from an Mleader object that contains a block. I can get attributes from normal blocks with no problem, but I am struggling with this.
I can get all the way up to casting the attributes, but when I try getting the Attribute Reference, the code crashes. How do I get the AttributeReference from the AttributeDefinition? As it is now, if I declare the AttributeDefinition, the values return as nothing.
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database Dim acEd As Editor = DocumentManager.MdiActiveDocument.Editor '' Start a transaction Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() Try Dim acBt As BlockTable =
[code].........
View 2 Replies
View Related