AutoCAD .NET :: Getting Anonymous Blocks Name?
Jan 8, 2007
I have a drawing containing simple blocks and "compound" blocks (blocks composed by smaller blocks). I prompt the user to select a block. If the block is a simple one, I simply show its name. Otherwise, I have to get the names of its sub-blocks and show them to the user.
When I thought I got it, I saw that when exploding some compound blocks (using Entity.explode()), some of the entities returned are anonymous blocks (*U80, *U67, ...). The problem is that this anonymous blocks are not dynamic blocks (BlockReference.IsDynamic() = false), so I can't get their name accessing to its DynamicBlockTableRecord.
View 3 Replies
ADVERTISEMENT
Oct 23, 2012
I have the follwoing error in C3D R2013.Unable to cast object of type 'Autodesk.AutoCAD.DatabaseServices.BlockTableRecord' to type 'Autodesk. AutoCAD. DatabaseServices.BlockReference'.
When casting from a number, the value must be a number less than infinity..Make sure the source type is convertible to the destination type
My code is:
Imports SystemImports Autodesk.AutoCAD.RuntimeImports Autodesk.AutoCAD.ApplicationServicesImports Autodesk.AutoCAD.DatabaseServicesImports Autodesk.AutoCAD.GeometryImports Autodesk.AutoCAD.EditorInputImports Autodesk.AutoCADImports Autodesk.AutoCAD.ApplicationServices.ApplicationImports Autodesk.AutoCAD.LayerManagerImports.
[code]..
View 3 Replies
View Related
Mar 11, 2005
I want to explode all anonymous blocks, but how do I create a selection set of them.?(ssget "x" '((2 . "*U*"))) doesn't work, and is dangerous if you have any blocks with the letter 'u' in them.
View 9 Replies
View Related
Jan 19, 2012
I recently updated our CAD Library to dynamic blocks. In the process of updating our drawings, we realized that we could not use BLOCKREPLACE to replace dynamic blocks with another dynamic block (with new name) once the dynamic element has been changed. I realize that this changes the state of the block and anonymous block names are created.
I need a simple solution so that members of my group can easily replace dynamic blocks with new dynamic blocks.
View 7 Replies
View Related
Dec 27, 2013
now i can get the anonymous blockname like 'uxxx', but i want to know the original block name before the insert changed to an anonymous block.
ps,the block is not a dynamic block.
View 9 Replies
View Related
Apr 10, 2012
I'm trying to create blocks on the fly by drawing a polyline, using a jig, and then grabbing that polyline and creating a block from it.
I'm not interested in block names, so anonymous blocks seem to be the way to go. I've successfully managed to create the block and even add attributes to it. However, if I try and use battman or attsync AutoCAD tells me that "This drawing contains no attributed blocks." I can however double-click on the block and go to the enhanced attribute editor, which shows me the attributes with the tags I've given them. Exploding the block reveals that there is no nesting occuring.
My attributes seem to be stck in limbo...
The function that creates the stand is:
{ Transaction trans = ed.Document.TransactionManager.StartOpenCloseTransaction(); try { //create new instance of the polyline jig polylineJig.polylineJig plJig = new polylineJig.polylineJig(); promptStatusResult = plJig.newJig(); if
[Code]....
View 2 Replies
View Related
Sep 19, 2011
If you do a LIST command on a dynamic block... AutoCAD tells you the Block Name as well as the Anonymous Block name.
How can I use ssget to snag all Dynamic Blocks that use the 'Real Block'?
View 3 Replies
View Related
Mar 8, 2013
When dynamic blocks are inserted they're assigned an anonymous block name. I'd like to be able to retrieve the name of the parent block after selecting the block on screen using AutoLisp.
Need a bit of code that handles this?
View 3 Replies
View Related
Feb 28, 2011
(defun CELBLKS ( / e blk ss blkl)
(setq blkl "" ss (ssadd))
(while (setq e (entsel "
[Code]....
i have this lsp, it works great but how can modify it if i want select with a window.? exemple: if i have 3 differentes blocks, i want to select them with windows and the lisp select all blocks that are identical of those 3.?
View 9 Replies
View Related
Aug 22, 2013
We have a new title block which now contains various fields to automatically populate the drawing number, number of sheets, issue etc. The problem we have is when we go to zoom all or extents on a layout tab it moves the layout to the right each time. If we only have one layout or we use a plain title block i.e. with no fields, the zoom works fine (layout stays put in the center). This is also true if we directly insert a field onto the layout - again no problems.
The cause of the problem only happens when a block containing a field is inserted onto the paper space of a layout and,there are multiple layouts containing blocks with fields.
View 6 Replies
View Related
Aug 8, 2013
How to find no of times specific blocks used in a drawing?
View 9 Replies
View Related
Jul 15, 2011
How do I manipulate a height parameter all of the dynamic blocks in the drawing from one single field? Say a field located in the drawing properties or on the drawing itself.
For example: Multiple blocks of different walls of same height with other blocks of things on located on those walls, dependant on the wall height, all linked to and changed by a single field. Possibly a Wall Height field located in the custom tab of the drawing properties.
I can pickout each of the blocks and change them at the same time in properites menu because they all share the same parameter name. I would just like to have that height parameter of every block in the drawing, that has that specific parameter controled by a single field. Which I could enter a new height at anytime that would change every block in the drawing to that height.
View 1 Replies
View Related
Aug 2, 2012
We used a bespoke program to convert our drawings to Java applets for web usage. This does not cope with dynamic blocks at present and we have started to receive drawings from our clients using them.
I need to replace this with standard static blocks based on one of two criteria. Either:
1) Replace based on visibility state (have generic chair block with multiple different chair types set by visibility type, need to replace depending on which type it is set as)
2) Replace based on parameter (have table with size set by dimensions, need to replace with static block for each dimension)
View 0 Replies
View Related
Jan 7, 2014
I have over 100 blocks that I need to add the exact same objects and visibility state to. Is there a way to globally make this change, or even to copy the visibility states from one block to the next without having to recreate the states in each block? I thought I had previously run across a routine on here that would make changes to multiple blocks at once, but I can't seem to find it now.
View 1 Replies
View Related
Jan 24, 2012
I have a project in 3D that I would like to export to Stadd. This requires lines rather than blocks. Is is possible to convert the blocks in the attached dwg file to to lines that are centered on those blocks?
View 9 Replies
View Related
May 18, 2012
The AttSync command does what it advertises fairly well. My problem is that I have thousands of small blocks in a single drawing. (My current drawing has 2100 block references with four attributes in each one.) I may change the attribute values in a few of them and need to re-sync the attribute locations. When I run AttSync it updates every single block insertion. One of two things are desired:
1)Flag each block insertion as having been sync'ed, reducing the number of objects requiring synchronization when AttSync is called again. Provide a way to force all to be sync'ed.
2)Allow a selection set in the AttSync command after selecting the block to sync.
Either or both of these would a great time-saver for those of us with large numbers of blocks with attributes.
View 1 Replies
View Related
Apr 24, 2013
I built a building foundation for a grading plan and I have another building that is the exact mirror of it. I have tried to mirror it. Didn't work. I created a block of the feature lines and inserted it with a -1 x value but I can't explode it. I tried the regular explode and xplode. Neither worked. I can use the the block to draw feature lines over but it just seems so much easier if I could figure out how to explode the block.
C3D 2013
View 2 Replies
View Related
Jan 24, 2012
I have the same block repeated multiple times in a drawing, and I want to delete the last attribute in all of the specific blocks. When I edit the block in block editor, the attributes do not show up. After I explode the block, there is no text. The attached image shows the properties of the block.
View 9 Replies
View Related
Apr 29, 2013
I am using AutoCAD 2013 on Windows 7 platform
95% of the blocks on the palettes have the images associated, and named, per the block name.
I have 48 blocks that the images are named like this "Block tool_F2149212-4649-41F5-95E6-4A978EC376F5_2".
I have tried resaving the blocks and recreating the blocks to no avail.
How to get these few blocks to have images that are associated with the actual block name and not the generic "block_too" name?
View 4 Replies
View Related
Dec 4, 2013
I am trying to update blocks for a client. Each block has a line of text with the block name in it. I would like to automate these with a field so that if the block name changes or a new block is created from that one, then the field would update as well. I am running AutoCAD LT 2012 currently.
View 8 Replies
View Related
Nov 20, 2013
I wish to have a single dimension alter the dimensions in a set of nested blocks, similar to shared parameters in Revit. For example, I have a circle that has a fixed diameter that I wish to control in all blocks. I have set the diameter to barDia so now I wish to manipulate the dimension from outside the block.
Am I able to share the parameter across all the blocks?
View 1 Replies
View Related
Jun 20, 2012
I was trying to alter the standard blocks on the tool palette. How I messed everything up but I basically have two huge problems now.
1. I am missing the necessary default blocks that should be under my edit block directory.....all the Aecb files.
2. Now when I try and put in a receptacle or any other standard block a triangle with an exclamation point shows up upon insertion.
I attached a picture of the "edit block definition" and the troubled symbols.
View 1 Replies
View Related
Feb 19, 2013
I received a file that has a large number of blocks with unnamed blocks inside. I need them all to be by layer, and i really don't want to explode it.
How can I can do it?
View 6 Replies
View Related
Oct 1, 2011
I have been working on a drawing with 3 different dynamic blocks for several weeks and everything has been working perfectly. However, all of a sudden this afternoon, the text in all 3 dynamic blocks disappeared and will not display on the screen in paper or model space, and does not print.
As best I recall, I was creating a polyline viewport when this text disappeared.
I cannot turn the text on in these dynamic blocks. The text in on layer 0 which is on, and is unlocked and unfrozen. Additionally I have turned on, unlocked and unfroze all layers in the dwg and this does not work. I have also checked the text layer in the block editor and it is on layer 0.
When I click on any of the blocks, all the information appears to be correct, ie: door numbers, text style, etc. The text, however, just does not appear. Also I have never set any invisible text parameters and when I open the block editor, nothing in the invisible text area is selected or select-able.
Previous versions of this drawing, which I saved yesterday, display all block text perfectly. Perhaps there is a setting I accidentally hit which caused this problem?
I have tried repeatedly turning on all the layers, unfreezing, unlocking, changing parameters in the Style menu. I closed Autocad and turned the computer completely off and back on again.
View 1 Replies
View Related
Dec 12, 2013
how can i separate same type of blocks in dynamic blocks? all layers are same..
View 9 Replies
View Related
Nov 30, 2012
I have a program that plots all blocks to png - open a dwg, get a list of all blocks, insert each into an empty dwg, zoom extents, and plot using the OOTB PublishToWeb PNG.pc3. In the attachments is an example of the problem. When I do this manually from a layout, I get the correct image. When I plot from code using the same PC3 file, draworder is being ignored.
It works if I apply transparency to the block and use ps.PlotTransparency = True, but I would prefer not to have to tell the user to change the block definitions. Is there a plotsettings property I am missing?
View 1 Replies
View Related
Oct 4, 2012
I want to create some symbols which includes text. For example, I have a square with an "F" centered within the square. The problem I am having is when I insert the block into a drawing and rotate it, the "F" also rotates. Is there any way to make it so the "F" is always horizontal no matter how I rotate the block?
View 2 Replies
View Related
Aug 17, 2012
I've just started to learn how to use Annotative Blocks and i'm running into what is probably a very simple problem. I'm creating a block and want to assign annotative scales to it. Once created, I insert the block into the drawing I need to use it in, and the only scale that shows up is the scale that is active when inserted.
All the other scales I added when creating the block are gone and I then have to assign the scales to the block again. I would prefer not to have to manually assign the scales every time the block in inserted into a drawing.
View 4 Replies
View Related
Aug 8, 2012
when I modify a dynamic block, that change persists to all other dynamic block that I have in the drawing. For instance, when I stretch the tail of a section callout, every other section callout stretches as well, which is quite inconvenient as you can imagine. I need each individual blocks changes to be independent of the others.
View 8 Replies
View Related
May 5, 2010
I've made annotative blocks and I've made dynamic blocks... My intent is to integrate both but I can't find a way to move dynamic block parameters separately at different annotative scales.
In other words, if I insert an annotative dimension and add multiple scales I can move the dimension grips independently at each scale. If I insert a dynamic block I want to be able to use the dynamic block's action "grips" to do the same. However, with a dynamic block, if I move a stretch action at one annotation scale it moves the action at all annotation scales.
The attached file shows a simple example.
View 2 Replies
View Related
Jan 25, 2013
Can I scale up a 100+ blocks at once and have each base point as the blocks insert point?
View 9 Replies
View Related