AutoCad :: Text No Longer Locked When Inserting Block Into Drawing
Apr 30, 2012
I have created a dynamic block of our companies Stage section. The block is set up as a rectangular array using XY parameters.
The block itself works fine however I created block attributes in the block dwg to display its measurements using the Distance x and Distance y totals.
When inserting the block into a new drawing I need to explode the block in order for the array to work, however this also means that the text is no longer locked to the block.
I am trying to insert a block from another drawing, the only way I have been to acheive this has been to open the drawing
Set ObjDocument = ThisDrawing.Application.Documents.Open("D:ACADBlocksGENERAL.dwg") For Each ObjBlock In ObjDocument.Blocks If InStr(ObjBlock.Name, "LOGO") <> 0 Then CopyObjects End If Next
ObjDocument.Close
I would prefer not to open the drawing to access the block, is this possible in VBA.
I want to insert a stored block into a drawing (model space). Below is the code I'm using and I get
Runtime Error '5': Invalid procedure call or argument.
Sub Dummy() Dim COESTD_obj As AcadBlockReference, InsPtStd(0 To 2) As Long, COESTD As String COESTD = "C:JimHYDROCAD_DwgsBlocksZ_COE_STDS.dwg" InsPtStd(0) = 0#: InsPtStd(1) = 0#: InsPtStd(2) = 0# 'Set insertion point as 0,0,0 Set COESTD_obj = ThisDrawing.ModelSpace.InsertBlock(InsPtStd, COESTD, 1#, 1#, 1#, 0#) End Sub
I'm trying to build a routine for my job to insert a block which consists of 3 single line variable attributes in a specific order. I need to be able to do this on many different drawings, and I would like to share this ability with my coworkers. Using the DesignCenter is not an option. In order to do this, I saved a drawing which consisted of the three attributes in the layout in which I need them to appear, however the order in which it prompts me to enter them is reversed. I already know how to set the order of attributes in an EXISTING block definition using the BATTMAN command, as every time I run the routine again, I'm redefining the block definition.
I'm not sure if it's important to know this, but the routine consists of a button with the following macro:
I had been trying to insert a title block (block) in to a drawing as part of changing the title block But in some drawings the block gets scaled off. Is there any system variable or any solution to maintain the drawing without getting scaled while inserting block.
I had used -dwg units and this appears to single drawings only. Any other way to do this to all the files in a folder.
I am inserting a block into my drawing that has attributable text, and when I insert and pick the insertion point, the block prompts me immediately to fill in attributable text fields. My problem is that it runs through the sequence twice. How can I edit the block so it only does it once?
starting a new job at work so setting up the job folder etc. grabbed the title block and the text attribute insert from the library.....
so here is when the issue started.....so title block and text attribute are both saved in model space, both have all the same settings, this also applies to the template we have here all match.
so i xref in my title page at 1:1 which comes in normal, then i insert my attribute block in at 1:1 but it comes in at some super size thing, normal 3.5 text size is now 1000......
have fiddled with everything gone back to the library set etc but got no idea.
the interesting bit is if i open the title block and insert the attribute block in, it comes in perfect......
so in saying that i am assuming it is the work template..... but none of this has changed for over a month and have created drawings since then........maybe a random setting somewhere has changed but again haven't done anything different to normal no new radical changes....
i have attached a copy of the title block and the text attribute.
InDesign has a great feature where the filename can be inserted as variable text which will automatically update whenever the filename is changed. Is there a plug-in for Illustrator which can do the same thing?
We're using C3D 2013 SP2. The survey company we use uses point styles to show the blocks. Say they shoot a catchbasin. Instead of inserting the block, the point shows up as the block.
I did a field check & needed to insert a missed CB. When I inserted the block, the other points that were CBs disappeared. I had to insert the block, copy it the clipboard, undo the insertion & then paste the block in. It did this on other drawings & other blocks.
Is it possible, via whatever methods (lisp?) to be able to have a premade block with an attribute and insert it into a drawing then assign a value to it by selecting another existing block in the drawing and using one of its own attribute’s values?
For example, say I have a block representing a telephone and it had an attribute called "PhoneNo" and I inserted it into a drawing showing an office floor plan that had blocks in each office space that are telephone junction boxes with attributes "PhoneExtension". I would like to be able to autocomplete the entering of the “PhoneNo” data by selecting one of the telephone junction boxes in the drawing and using its attribute’s value.
I have created d/blocks for my different pipe sizes i.e one block with a dropdown to select the different sizes and have done the same for my flanges. now how do I link / insert the flange d/block to the piping block so that I can export the information into a material list later on.
Is it possible to have a dynamic block with text which, when inserted into a drawing, will show the text orientation matched to the layout? I have a non-dynamic block which is simply a donut and a piece of text. When I insert it into a drawing, the text orientation will change to suit the orientation of the layout. I created another block with the same entities but I also added a couple of lines extending out from the center of the donut. I added stretch and rotation actions in order to rotate and stretch the lines. I also gave the block visibility states so that either one or two lines would appear (the block is a utility pole,by the way, with the lines representing guy wires). When I insert the dynamic block into a drawing, I cannot get the text to match the orientation of the viewport. I've tried changing different combinations of settings but the text won't appear horizontal.
The two blocks I mentioned above are inserted into one file with a number of other blocks. When I check the properties of the non-dynamic block, the "match orientation" is set to YES. I cannot, however, change the "match to orientation" setting to YES on the dynamic block. Is this simply because it is a dynamic block or am I missing something? I don't create a lot of dynamic blocks and therefore I am not a wizard at it so I am assuming I am doing something wrong.
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?
I have several blocks saved as separate .DWGs, some of which are dynamic. I want to review and test these blocks, but I can't find a way to open the existing block definitions in the Block Editor without first inserting the blocks into a drawing.
Eventually after I copy and paste with the clipboard enough times within one drawing, the ability goes away and I can no longer copy and past one item from one drawing to a separate drawing. I need to use the clipboard function because that is the only way of getting an item from one drawing to another.
I have download a clear clipboard function but it doesn't work. Closing CAD and restarting does not reinstate the function.
I am trying to create a block which consists of my company logo and some text to use on my drawing sheets or templates
I have created a block by making a autocad drawing and creating /saving it as a block .. When I insert the block into my drawing the text style changes into a different style... why is this happening and what can be done to prevent this change from occuring. I am using autocad lt 2009 and 2005 the problem is consistant with both versions...
I would like to know if there is a way to insert drawing no.1 into drawing no.2 (not copy sheets!) so that if I change the drawing no.1, the drawing no.2 (the one that contains no.1) also updates.
That is because I would like to have one part of the drawing that is ''standard'' and multiple drawings that contain this part (so that this part is defined in all drawings but is always the same). Because I don't want to have a separate drawing for the ''standard'' part, but only drawings that contain it.
Can I pre-fill some of text in my drawing’s title block under the “Field Text” –“Edit Property Fields” ? Because some of the files I will use the same text again and again, if I can save the pre-fill text title block in the template, it will save me lots of time.
i have a drawing boarder that is a block with enter-able text fields for drawing revision etc but for some reason the order in which you would enter the rev's 1,2,3, etc is the wrong way round in the enhanced attribute box. So when i click and start typing i end up with 3,2,1 in the rev boxes.
I wish to insert a title sheet dwg, which has attribute definitions, as a block in another dwg. I can insert it, and if I explode it, the attribute definitions appear. Otherwise they are not added to the database.
I am using standard code, which I can attach. it starts
Dim btr As BlockTableRecord .. Dim blk As BlockReference = New BlockReference(ip, blkid) ' insert block .. btr.AppendEntity(blk) If btr.HasAttributeDefinitions Then ForEach attID As ObjectId In btr etc.
We have just done an overhaul of all our standard block symbols. These ultimately get saved into our title block template files.
Is there an easier way than Inserting each block individually?
Is there a variable that can automatically Redefine all blocks if I drag them in using ADC? The default setting is that any block that is already defined in that drawing will not get redefined.
Im having some troubles inserting a block into a line. See image. The block on the left inserts into the line and has attachment points (AutoCAD P&ID Provided) the block on the right i created. Im unable to get it to insert within the line without manually breaking the line after insertion, the result being the line through my block.
Every time I insert a block (dynamic or otherwise) into any drawing (I have tried several) my ucs (0,0) changes to the insertion point of that new block. I don't know what I have done, what button I have inadvertently pushed or setting that I have set, but I do not know how to undo this!
I have a ton of blocks with attributes. Sometimes when I insert them, AutoCAD (2011) prompts me in the command line (perfect). Other times, a prompt box appears to insert attribute definitions (annoying).
What setting do I have wrong, or am I setting the blocks up incorrectly?