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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Insert Point At List Block And Dynamic Block

Apr 18, 2013

I am learning autolips and i found  a problem that i can´t solved.
 
(vl-load-com)(defun c:pmb ( / ss ent pt )(prompt "
selec block : ")(setq ss (ssget '((0 . "INSERT")))) (setq ent (ssname ss 0)), (setq pt (cdr (assoc 10 (entget ent)))) (command "point" pt))
 wich this code you select one block and insert one point at insert point´s block.

which this other code yo select all block and insert all  point.... but in one block
 
(vl-load-com) (defun c:pmb11 ( / sele cod bloque nbloque lista pt ) (prompt "
block: ") (setq sele (ssget ( List'(0 . "INSERT"))) Cod 0 )cod (1+ cod) (repeat (sslength sele) (setq bloque (ssname sele cod)) (setq pt (cdr (assoc 10 ( entget bloque)))) (command "punto" pt) );repeat ) 

View 4 Replies View Related

AutoCad :: How To Delete Block From Insert Block List

Oct 20, 2007

I am using Autocad 2007 I made several blocks with att. And I use this drawing and copy it to the samples/design center folder so that I can see the blocks that I created on the Design center window for use on different other drawings.

My problem is that if I make a cange on the ORIGINAL block drawing how can I update the inserted blocks on the other drawings? I try to delete the block from the local drawing insert block list (is this possible?) to paste the block again with the new changes, but somehow even when I grab the new modified block to inserted again when I do it, it takes the shape of the old version!

View 6 Replies View Related

AutoCAD 2010 :: Creating A Place To Insert Blocks

Jan 15, 2013

I worked with about 70 blocks that I routinely insert in drawings, at present I have an area where I keep all them in every drawing.  I would like to have a bar that will contain the blocks where I can drag and drop them into place.

View 5 Replies View Related

AutoCad :: How To Insert A Block Into Drawing Uses Dynamic Blocks

Oct 17, 2011

I am trying to insert a block into a drawing that uses dynamic blocks. I want the block to be associated to the dynamic block, so that when I alter a linear stretch parameter on the dynamic block it moves the other block.

I am probably missing something obvious, but have now googled my mind into a numb state and can't make any more progress.

View 3 Replies View Related

AutoCAD Inventor :: How To Insert Blocks Into Title Block Definitions

Mar 20, 2012

I'm trying to insert our company logo (a DXF file) into the a title block definition however the insertion point seems to default to 0,0.How can I insert it with a user defined insertion point?

You will see from the attached screen snipe what I mean about being forced to insert it at the 0,0, coordinates. I'd like to insert it into clear space then scale it and move it into replace the existing logo.

View 4 Replies View Related

AutoCAD Dynamic Blocks :: Creating Array Within Block That Is Setup With Constraint Parameters

Feb 6, 2013

I'm trying to create a window block with a grille.  I've created the block and the horizontal grilles.  What I'm having a hard time with is creating the vertical grilles.  I would like to set up an array that would take the glass width, divide by 12, round up the value to get the number of vertical sections.  Here's the code that I've figured out:

(W/(ceil(GW/12)))

W=Width

GW=Glass width

How do I set up an array with this formula?

View 2 Replies View Related

AutoCad :: Insert Dynamic Block From File With Multiple Dynamic Blocks

Jul 16, 2010

I have a drawing ("SURUBURI.dwg") with several dynamic blocks ("M12", "M16", "M18" ... an so on...). I want to insert in my current drawing, one of the blocks from SURUBURI.dwg, for instance the block named "M12".

For that i tried creating a new command "INSERT_M12" that has the following script :

^C^C-INSERT; "I:/Ionut Mihaila/Goodies/SURUBURI.dwg/M12"

Now obvious that doesn't work, but i think it shows clearly what i want to accomplish. So is there an other way to do this?

View 9 Replies View Related

AutoCAD .NET :: Insert Block From External DWG File / Specify Insert Point By Click Mouse

Apr 2, 2013

I write a program, this program needs to insert some standard illustrations. I made these standard illustrations into different blocks. And I store these blocks in a dwg file. Everytime I need to insert some illustrations, I just click the mouse on the current drawing, I want the illustration inserted. These means the following points:

(1) Import the blocks to the current drawing, if the blocks have already been imported, then do nothing.

(2) Specify the insert point by clicking the mouse, and I want the block's insert point to coincide with the mouse clicking point.

View 1 Replies View Related

AutoCAD .NET :: Plots All Blocks To PNG - Open DWG / Get List Of All Blocks

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

AutoCAD 2010 :: Dynamic Block Grips - Block Does Not Change When Insert In Another File

Oct 28, 2013

I have created a dynamic block with a stretch, flip and rotate.  Everything works great in its file.  When I insert it in another file, the grips move but the block does not change.

AutoCAD 2014

View 2 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 .NET :: Insert Block And Drag Jig Hiding Inserted Block At 0,0

Apr 11, 2013

I have a pallete button that inserts a block then a drag jig to position it. The block is first inserted at 0,0 and dragged.

The block at 0,0 remains visible while a "duplicate" block is dragged. Is there a way to hide the original?
 
Insert block then calling the drag jig..
AddViewBlock(New Point3d(0, 0, 0), 0, ColorIndex, trans) psr = ed.SelectLast() DragView(psr.Value, "Bar Insertion Point")
 
In the DragView procedure I have:

 Public Sub DragView(ByVal SS As SelectionSet, ByVal sPrompt As String)
'....
Dim ppr As PromptPointResult = ed.Drag(SS, vbLf & sPrompt, New DragCallback(AddressOf MyDragCallback))

View 4 Replies View Related

AutoCAD .NET :: Insert Dynamic Block And Position And Stretch The Block?

Apr 6, 2013

I am trying to insert a dynamic block and position and stretch the block, using the linear parameters, depending on values entered into a form.

I managed to create a form that would draw a series of boxes. And i managed to create a routine that would insert a block and size it depending on fixed values but i can't link the 2 together.

Win 7 Pro 64bit, Dell Precision M6500

View 8 Replies View Related

AutoCad :: Create Block To Insert On Title Block

Oct 26, 2012

Is it possible to create a block to insert on our title block that will populate itself with a list of drawings and names?

I know this is possible through the use of LISP and the Sheet Set Manager, but could this be done through a combination of attributes and fields (we want the same functionality in LT).

View 1 Replies View Related

AutoCAD Dynamic Blocks :: How To Get Blocks To Have Images Associated With Actual Block Name

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

AutoCAD Visual LISP / AutoLISP :: Insert Point At Block Insert Point

Sep 26, 2012

trying to insert point instead of block.

(setq blok (entget (car (entsel))))

(setq point (cdr (assoc 10 blok)))

(setq XX (rtos (car point) 2 20)) ;; x koordinata bloka

(setq YY (rtos (cadr point) 2 20)) ;; y koordinata bloka

(setq ZZ (rtos (caddr point) 2 20)) ;; z koordinata bloka

(command "point" xx,yy,zz) is not working

!xx="5582453.414999999" but when i (atoi xx) i get 5582453 no dedimals...

how to create valid insertation point from xx, yy and zz?

View 6 Replies View Related

AutoCAD .NET :: Insert Block Reference Using Block Name

Nov 17, 2012

Drawing contains a block with "BlkName". I want to insert blockreferences of this existing block using .Net. All shows how to insert a new block and then use the BlockID returned by the insert function. In my case I only have the block name and there is no Block id. How to get it or how to create a block reference of an existing block?

View 3 Replies View Related

AutoCad :: Scale Up 100+ Blocks At Once And Have Each Base Point As Blocks Insert Point?

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

AutoCad :: Dynamic Piping Blocks - Inserting And Linking A Flange Block To Pipe Block?

May 21, 2013

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.

View 1 Replies View Related

AutoCAD Dynamic Blocks :: Actions And Parameter Grips Obscure Drawing-block In Block Editor

Mar 28, 2011

My drawing- block is a little bit complicated, it contains few actions and parameters and everytime i open block editor to add, or to modify some action I can't see my drawing because actions grips and parameters grips obscure my drawing. I tried to refresh layout but it doesn't work.

please take a look on attached jpg.

View 1 Replies View Related

AutoCAD Dynamic Blocks :: Various Block Properties Tables In One Block?

Jun 26, 2013

is it possible to define more than one block properties table in a DB?

I have a block definition with several attributes. I would like to pick a (predefined) value for each of the attribute. Making just one block properties table means that I need to fill all the possible combinations of these attributes.

View 5 Replies View Related

AutoCAD Architecture :: Insert Sheet List Table?

Aug 28, 2012

I am insert a sheet list table - Two Columns "Dwg #" and "Sheet Title" under the first category (building 1) each column works fine) then under category 2 (building 2) it gets the file name under the dwg #.

View 2 Replies View Related

AutoCAD Architecture :: Insert Sheet List Table?

Dec 21, 2011

From Project Navigator, I R-click the Project in the SHEET tab. This is not "lit up" to choose.

I am in my cover sheet, paper space, with 51 sheets in the set.

I tried to use the Sheet Set  Manager, but I have the same problem.

View 6 Replies View Related

AutoCAD 2010 :: Sheet List Table Won't Insert

Jun 26, 2012

We are experiencing a case where the sheet list table will not insert into a page. It works on all other jobs, but this one won't let a sheet list table insert into any page, by any body.

I even tried inserting a block of the table from another set and then updating - all the lines disappeared.

We have done about 200 jobs with these, without trouble and this is the one giving us problems now.

View 9 Replies View Related

AutoCad :: Unable To Insert Blocks

Feb 16, 2011

I am having a right torrid time with this drawing first of all the seat numbers (see previous post!!) and now I can't insert a block!!

I select insert block and the dialogue box comes up - I then pick the block that I want and I check the insertion point box to specify on screen but uncheck the scale specify on screen and set it to 1.0 which is the same as the block unit, I then click ok and select a point on the drawing where I would like the block to go by clicking my left mouse button and nothing happens!

I have tried upping the scale of the block but this still does not work!

View 4 Replies View Related

AutoCAD .NET :: Insert Multiple Blocks Within One DWG?

Jun 1, 2012

I'm trying to get a routine that creates and inserts a copy of all the block entities in a DWG.  For some reason the code causes CAD to hang?  See attachment for code.

View 6 Replies View Related

AutoCAD 2013 :: Insert Sheet List Table Is Not Active?

Nov 6, 2013

“insert sheet list table” is not active, 

I couldn’t figure out in which cases the “insert sheet list table” (attached) gets not active.

This command is supposed to provide table of contents for the layouts specified in the set of sheets pane

Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.

View 9 Replies View Related

AutoCad 2D :: Blocks Of Structural Members To Insert

Aug 28, 2013

I have a friend that is using AutoCad Mechanical which comes with blocks of structural members to insert, she is using Cad 2011. In one drawing if she inserts a channel and say the channel is 8" long, it inserts correctly but in other drawings if she goes to insert the same channel, it insert at 16'-0". Why?????

View 4 Replies View Related

AutoCad 3D :: How To Insert Blocks But They Are No Longer Solids

Jan 23, 2013

I drew several components in one drawing and saved them with WBLOCK. I opened the drawing into which I wanted to insert the blocks but they are no longer soilds. They are just the lines upon which the original soilids were based. What have I done wrong?

UPDATE: I purged the drawing and the blocks inserted correctly.

View 1 Replies View Related

AutoCad :: INSERT Multiple Blocks At One Time?

Sep 5, 2012

My coworkers are positive that they have been able to INSERT multiple blocks at one time but now when using the INSERT command, they can only select a single block for insertion. I tried recreating the issue and it does the same thing for me both using DESIGN CENTER and the INSERT command. Is there a setting somewhere that controls the number of blocks you can INSERT at one time or are they just delirious?

If it isn't possible to do in AutoCAD, then is there possibly a LISP routine out there that will achieve this?

View 4 Replies View Related







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