AutoCAD .NET :: Creating Nested Block

Sep 18, 2013

sample code for creating nested blocks.

View 4 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Removing Nested Block From Main Block?

Oct 3, 2013

I get an AutoCAD drawing from my conveyor manufacturer who have buried a block (tagname) in all of their conveyor blocks.

The only way to remove them is to manually use BEDIT and erase the tagname block.

Is there a way through Autolisp to search all blocks in a drawings and if the tagname block is part of the definition of the conveyor block, erase the tagname block or redefine the conveyor block without the tagname block.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert A Block / Explode And Rename Nested Block With Suffix

Nov 30, 2012

I have a block that i want to insert several times and revised each one to be different to do this i would have to insert it and rename the blocks that come in and then reinsert i would like to insert and have a lisp explode the main block and rename the other 2 blocks with a suffix at the end depending on how many times its in the drawing... can this even be done? My original block name that will be first inserted is "BENT PULLEY NOTES" it needs to explode after i drop it in and then there are 2 blocks within that called "Bent Pulley" and "Bent Pulley DYN" that i was hoping to keep the names but add a number at the end depending on how many are in the drawing already...

here is a lisp that i have found... it would work if i didn't have nested blocks and only wanted the one block to be insert and not explode...

(defun c:Test (/ e i name Bname )
(setq e nil)
(command "_.-insert" "Drawing1.dwg" pause "" "" "")
(if (setq e (entlast))

[Code] .......

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Get Name Of Nested Block

Nov 27, 2013

I need to pick a nested block in drawing, I prepared this code to get name of selected blocks:

 (defun c:test ( / e obj blkName)(while T (while (Not (setq e (entsel "
Select a BLOCK to edit: ")))) (setq obj (vlax-ename->vla-object (car e))) (if (= (vlax-get-property obj 'ObjectName) "AcDbBlockReference") (setq blkName (vlax-get-property obj (if (vlax-property-available-p obj 'effectivename)'effectivename 'name)) );setq );if (princ (strcat "
Block Name is: " BlkName)));while);defun

 But, how to select a nested block?

View 4 Replies View Related

AutoCAD .NET :: Nested Block Position In Model / Paper Space

Feb 7, 2013

BlockTableRecord.Position gets the position of the block in its owner. So if it is a nested block, it gets the position inside the parent block.

I want to get the position of a nested block in the space (model or paper). One way of doing this is getting the location of that parent, and if the parent is also nested, get that position and so on...and then calculate the position of the nested block.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replace Nested Block

Aug 7, 2012

I have a dynamic block that has a nested temporary block inside it. What I am wanting to do is replace the temporary block with the permanent block. I have tried several different variation of coding but I cannot seem to get this bad boy to work. have used:

(vla-put-name (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))) "tempBlockName") "newBlockName")

this gives me a duplicate names error. 

View 1 Replies View Related

AutoCAD .NET :: Nested Block Position In Model / Paper Space?

May 31, 2013

I need to gather objects on a specivied layername within model_space in C#.

How do I add a fileter to my filtervalues to only grab model_space objects.

TypedValue
[] filterValues = new[] { newTypedValue((int)DxfCode.LayerName, LayerName.ToUpper()) };

[Code]....

View 9 Replies View Related

AutoCad :: Constraints Cannot Be Applied Between Nested Objects In Same Block Or Xref

Nov 23, 2011

I have two dynamic blocks. One is the plan view of a cylinder and one is the elevation view of a cylinder. When I change the parameter of the OD on the elevation, I want the plan view to change. I'd like to keep them as blocks (they're a little more complicated than just cylinders), but when I try to use parametrics to tie these two dimensions together I get: "Constraints cannot be applied between nested objects in the same block or Xref."

View 1 Replies View Related

AutoCAD Architecture :: Xref / Block Nested Object List Dialog Box Does Not Appear When Using XLIST

Jan 8, 2013

I am using AuotCAD Architecture 2012 and suddenly the Xref/Block Object List dialog box stopped opening when I use the XLIST command.  How Can I get this back?

View 4 Replies View Related

AutoCad 2D :: Creating A Block With Block Table And Constraints

Aug 25, 2011

So I'm creating a block with a block table and constraints. The constraints such as Geometric Constraints work just as assumed. When adding in dimensional constraints we start to have more fun. So I have dimensional constraints that use other dimensional constraints to manipulate itself.

EX. dimconC = (dimconB-dimconA)
dimconA is 12
dimconB is 14
dimconC would be 2
Now when ever dimconA or dimconB change dimconC would populate accordingly.

With this I wanted to make an attribute that could be placed in instead of a dimensional constant.

EX dimconC = ((Att1*dimconB)-dimconA)
Att1 is 02
dimconA is 12
dimconB is 14
dimconC would be 16

However when trying to place in formula that references a attribute I keep getting an error "A DEPENDENT EXPRESSION CANNOT BE EVALUATED" So I assumed it was missing an expression from the attribute, however once entering an expression in for it I still get the same error.

(full error message attached)Constraint_Error.JPG

Is this something that is not allowed at all or have I over looked something?

View 2 Replies View Related

AutoCad :: Creating A Block With Block Attribute?

Jun 10, 2013

I'm creating a block with a block attribute.

In the blockeditor I can change the draworder so the attribute is partly under some lines. But the draworder in the blockeditor of the attribute doesn't work in the normal modelspace; the blockattribute is allways on top.

View 9 Replies View Related

AutoCad :: Creating A3 Title Block From A1

Jan 18, 2013

I have a A1 title block in model space that I like the look of. I'd like to duplicate this in A3 and A4.Is there a way that I can scale the A1 dimensions to A3 and A4 to avoid having to redraw them again with the appropriate dimensions?

View 9 Replies View Related

AutoCad :: Creating Block With A Button?

Dec 19, 2011

ive got a block which ads a revision, description of change, drawn by and date to an existing titleblock. The small block has attributes, is there a way to make it so that when its double clicked it oped the ddatte dialog box? my comoputer is set so that when double clicking a block with attributes this happens which is fine, but on some of the other computers in the office it comes up with a different properties dialog box. I was thinking of a button which when clicked envokes the ddatte command for that block, I know how to do it in excel for eg but am just wondering if its possible to do something simialar in cad?

View 5 Replies View Related

AutoCad 2D :: Creating A Block That Does Not Prompt?

Mar 18, 2011

I have created a block attribute, but I want to be able to set it up so when I insert the block into my drawing, it does not prompt me to input a number in the Edit Attributes box.

View 5 Replies View Related

AutoCad :: Proper Way Of Creating A Block?

May 23, 2011

What is the proper way of creating a block?

I did 19 drawings, created blocks using the CREATE button, at first I could Insert them into any other drawing. But I saw this definition in a book,

Creates a block from separate entities (internal to current drawing), does this mean that a user on another computer cannot use my block unless he has the original drawing?

My boss told me that he uses WBLOCK instead, which writes to an external file.

I'm asking because out of the 19 drawings, 9-10 of them have the error "block referencing itself". I guess this is probably me naming the blocks the same as my file names.

So before I go any further, what is the proper way to create a block that can be used? I also shared my CAD folder on the network.

View 9 Replies View Related

AutoCad 3D :: Creating 3D Solid From A Block?

Apr 12, 2012

I am trying to cut out a logo from a 3D solid. Essentially the thing I'm trying to 'cut' is a box, simple. However, the logo I has is reasonably complicated and a conversion to DWG from an Illustrator file.

I have tried creating the whole thing as a surface, no luck

Tried exploding it into both lines, polylines and splines, no luck

The nearest I get is a long winded way round. Im having to joins the splines, then convert to polyline, then convert to surface, then thicken the surface. This would be ok, but there's lots of text and so on.

I just wondered if there's a simple way of doing it that I've missed? Such as "cut these 2D lines out of this 3D shape" command and then delete the sliced out pieces I don't want.

View 9 Replies View Related

AutoCAD LT :: Creating A Wblock From A Dynamic Block

Dec 6, 2011

I am in the process of creating a few really useful dynamic blocks. My problem is I wish to collect them in a library folder so each block is a stand alone dwg file. I know I used to to this in 2011LT, but that was some time ago and I have since changed company and we have 2012LT. I cannot for the life of me remember how to do this.

I have tried to do it the usual w-block way, but when I import them into a new drawing they are actually a block within a block. Is there a better way of doing this?

View 3 Replies View Related

AutoCAD 2010 :: Creating A Block Library?

May 15, 2013

I am using AutoCAD 2012 and have made lots of different files with individual drawings in them. I am planning to go into each drawing file and create a block for the drawing. After that I want to make all the blocks available in one drawing.

View 9 Replies View Related

AutoCad :: Renaming Existing Block Without Creating New One?

Apr 16, 2012

Is there anyway of re-naming an existing block without creating a new one? I made a rookie mistake of naming my blocks with names containing spaces i.e. 'block A' and 'block B' and have found that some routines like replace block won't work because of it.

View 3 Replies View Related

AutoCad :: Creating Fields For Title Block?

Sep 8, 2011

I am trying to create fields for a title block and then link them to a sheet set. I want to use my title block as a x-ref and not a block. Everytime i try to create attributes for it and then use the command Battman then it says there are not attributes created. I am now at a stand still on how to creat fields for my sheets and then link them to my sheet set.

View 8 Replies View Related

AutoCad :: Creating Title Block With Attributes?

Dec 23, 2013

how to create a title block that can be edited by double clicking on a block of text and then scrolling thru the list of each block of text.

View 1 Replies View Related

AutoCad :: Creating Block From Excel Data

Oct 24, 2012

Is there a way to create block out of excel data?

I am trying to create multiple block missing in our database, actually i have all the measurement of the fitting inside excel this is mostly elbow and T fitting.

I was thinking of a dynamic block with editable lenght (strech parameter with a mix of constraint). but before digging too deep in a wrong direction i want to ask community if something similar already exist?

View 2 Replies View Related

AutoCad :: Creating Attributes For Drawing A Block?

Mar 28, 2012

describe the process of creating attributes for drawing a block.

View 2 Replies View Related

AutoCAD .NET :: Creating Anonymous Block With Attributes

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

AutoCAD 2010 :: Creating Block With One Attribute (Elevation)

Feb 8, 2013

I am trying to create a block with 1 attribute (ELEVATION) showing a finished floor level and another text (field) to show another level derived by the sum of the attribute value + and additional (fixed) number, say 100.

I have tried using fields inside an ATTRIBUTE or a simple DTEXT but the field does not update, it only picks up the DEFAULT of the attribute, not the user entered input. How can I do this?

attached is the block

View 2 Replies View Related

AutoCAD LT :: Creating Information In A Block To Transfer To A Table

Dec 31, 2013

I am not sure this is even possible, but could I use some sort of invisible block attribute data and everytime I insert it into a drawing (I use the same block multiple times within a drawing) it would autopopulate fields in a table. For example I have a smoke detector symbol I insert, I also have a specific address associated with every single detection symbol I insert into a drawing, would I be able to attach data such as what type of detector it may be and have the address and type automatically populate in a table everytime I insert my block into a drawing?

View 1 Replies View Related

AutoCad :: Creating Flip State For Dynamic Block

Mar 28, 2012

I'm having a small problem with creating a flip state for a dynamic block that has 3 visibility states.

The visible/invisible parts of the block won't flip even though I have created 3 flip states (one for each visibility state) and selected all of the parts of the block I want to flip each time.

View 5 Replies View Related

AutoCad :: Creating Dynamic Block With Attribute Definition

Jun 10, 2013

I'm having trouble getting my attribute definitions to work with my blocks.

I'm trying to create a tag that can flip around (dynamic) and have a tag number easily entered (attribute).

I notice that I could only get the attribute definition to work during a drawing insertion is when I wblocked out my block and inserted that drawing file. I was not able to insert the drawing file that had the block in it.

I can't seem to make a dynamic block drawing file, and then insert that dynamic block drawing file if I want the attribute to work..

View 4 Replies View Related

AutoCAD .NET :: Creating Block And Insert Into List Of Blocks

Apr 26, 2013

I'm new to .net for autocad, but very familiar with c#. I studied some samples about creating a block from c#. I have a form for some basic input. When the user presses OK the code checks if the blockname is already in use. When no it creates the block using following
 
private void make_block() { double nextpoint = 0.0; double linedis = 7.3634; Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed = doc.Editor; using (Transaction tr = db.TransactionManager.StartTransaction()) {
[code]......

The code runs successfully (meaning i don't get any errors), but when I want to insert the block it isn't in the list of blocks.

View 2 Replies View Related

AutoCad 2D :: Creating Block Which Contain Text Displaying Scale?

Nov 12, 2012

What I want is to create a block which contains a bit of text displaying the scale (X scale only) of the block. Then, if I change the block's scale it will also update. Is this possible?

View 9 Replies View Related

AutoCAD 2010 :: Creating Dynamic Block With Scale Action

Apr 17, 2013

I am attaching my dynamic block that I am having difficulty finalizing. My goal is to be able to stretch or resize the hvac block, based on the size that is provided to me (ala 24x24, 36x36, 48x72, etc) (Stretch Action), I have that figured out, and I have the symbol in the center that stays centered as the block size changes, (Move Action).

Here is my problem, I want the symbol in the center to stay centered and scale based on a ratio as the overall size gets larger. So for example: if my size is a 24"x24" I want the symbol in the center to be approx 12" dia, but if the size gets up to say 60"x60" I want it to scale accordingly (so it could be like 48" dia), specifically maintaining the size based on the x axis, so if the it gets to a 60x72", I'd like it to still be centered but size according to the 60 width, and not stretch and look awkward. I want the center symbol to scale and stay centered in the rectangle as I scale the size.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved