AutoCAD Visual LISP / AutoLISP :: Accessible Parking Dynamic Block

Jun 2, 2012

I have successfully created accessible parking dynamic blocks. They work fine for new parking because they are set to always be a certain width. 5'-0" or 8'-0" for an access aisle, etc. What i would like to figure out is how to create an existing access aisle that can be stretched horizontally & vertically.

The problem is that when the striping is at an angle as is the case with the access aisle how do i go about doing this? Could i put some sort of geometric constraint to be able to stretch it horizontally & vertically & keep the striping at a given angle. Also the striping may need to array as it is stretched. 

View 7 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 Visual LISP / AutoLISP :: Making Dynamic Block Grip

Nov 4, 2013

Basically I want a dynamic block that works like an MLeader. I have built the block and can manipulate parameters, but haven't found a way to select a specific dynamic block grip.

It has a base point but then after placing the block I want to activate the stretch grip.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Editing Dynamic Block Elements

Apr 22, 2012

Is it possible to create a dynamic block completely from scratch using Lisp?

I also want the ability to be able to create different dynamic block geometry depeding on the Visibility parameter.

I seem to be able to create the normal (non-dynamic) block geometry using Lisp but cannot seem to find out a way to enter the block editor and create stuff pertaining to dynamic blocks.

I have 1000's of dynamic blocs to create and looking to a way to automate this using Lisp.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setting Dynamic Block Visibility?

Aug 17, 2011

Attached is a lisp that reads an attribute block value and uses that value to set a named view. The attribute block is a diesel expression field which reads the drawing number, so it changes as the drawing is saved to a new number. I use it when I am preparing road alignment drawings. I prepare the first drawing in the set, saving views for all drawings and when I'm done I copy that drawing 001 as many time as I need, rename them drawing 002, drawing 003 etc. and use the attached lisp with scriptpro to set all my saved views.

I also have a dynamic block called "key" in the drawing with visibility states matching the named views.

either expand this lisp or create a new lisp to set the visibility using the "VN" variable.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Dynamic Block By Its Name But It Does Not Work?

Sep 23, 2011

i am trying to select a dynamic block by its name but it does not work

(setq WW (ssget "x" (list (cons 2 "WET WELL"))))

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using Parametric Drawing Or Dynamic Block?

Dec 19, 2012

We currently have a bunch of Lisp programs to create drawings but I am interested in exploring how I can maybe use Lisp with either dynamic blocks or parametric drawings. I just don't know which would make more sense. Currently we have programs where we enter things like width, height, leg or radius, bars wide and high etc and it creates a drawing like the one I've attached. I know that if I can create this drawing as a dynamic block or a parametric drawing, then when there are revisions, I don't need to create the drawing again. I can just adjust the parameter or the dynamic block. What makes the most sense, a dynamic block or a parametric drawing? I should note that I'd still like to use autolisp to create the initial drawing (or insert the block) since that's what the users are used to.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Dynamic Block Programmatically?

Feb 23, 2008

I figured out how to entmake a Block with attributes based on user input for insert point, rotation, etc.

My block is a detail bubble that is a circle with a tail, that cuts the object and shows direction of cut. I will include that with this post.

My problem lies in this. I've used dynamic block features such as linear for the tail length, and the cut length, and angle for the direction of the tail.

My old routine was simple, it would ask for detail point and angle. From that it would insert a block that was just the bubble and draw the tail and cut with a polyline.

Since then I've been able to use entmake, which is a lot more powerful for creating entities in AutoCAD. But for the life of me I can't figure out how to add the dynamic properties of my "new" detail block that has the tail, cut and bubble in one.

what I need in the entmake statement to make this create programmatically instead of inserting the block, then modifying it, if possible.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dynamic Block - Accessing Action Parameters

Jun 3, 2013

I have a new project coming up where I need to write some simple programs to access the dynamic action parameters in some existing dynamic blocks.I have viewed what I could find on AU, but I still ave not found anything relating in-depth to dynamic blocks. 

Any good Tutorials, Articles, or White Papers, on  working with dynamic blocks with autolisp/ vlisp?  The main function is to access a parameter and change it by entering a numeric value, updating the block. say from a linear/polar stretch, or a linear/ polar move.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Possible To Create List Box For Dynamic Block Previews

Sep 23, 2013

I've spent the last week and a half creating blocks that have between 2 and 10 visibility states in order to represent the separate iterations of common valves.

I would like to construct a lsp and dcl (we work off of a network drive that would enable a stable location for an accompanying dcl file along with the base lsp, though I believe that in order to do what I'm wanting done some on-the-fly dcl manipulation may be necessary) that would display the current drawings in our dynamic block folder and upon selection within the first List_box, would display the different options for visibility states for the block in the 2nd list_box. After a user selects one of the visibility iterations that are now displayed in the 2nd list, an image preview (or slide, I can handle creating the different slides for each block once if required) of how the block will be displayed in the selected visibility state would be shown in what would be the 3rd space, this time an image preview and not a list_box, though I would like proportionality between the list_boxs and the image preview. Some white space is allowable in the list_boxes.

I'm not even sure if this would be possible, but I'm assuming you can access the different visibility states in the same manner that you could access polyline verticies or block definition attributes.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Dynamic Block At Default State

Feb 15, 2013

When scanning the BTR (Block Table Records) and encounter a "*U" block definition

how can i know if it relate to dynamic block and have it's name?

acutally my current goal is:

when insert a dynamic block at default state (no change in it's dynamic properties/actions)

it's 'Name and 'EffectiveName is equal, when set some of it's properties it turns to dynamic anonymous

with Name = "*Unn"

Can i programaticlly set the block reference to be dynamic anonymous (with out setting any of it's properties)

cause i would like to modify it's BTR (with out effecting the original BTR dynamic block) but do not want to convert it to static anonymous block.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: SSGet Specific Dynamic Block / Since They Are Anonymous

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

AutoCAD Visual LISP / AutoLISP :: Retrieving Number Of Entities In Dynamic Block

May 19, 2013

I am modifying stuff in a dynamic block insert entity. There is no "endblk" entity at the end of these definitions and I need to cycle through every entity within the block definition. When it gets to the last entity,  I get an error because you cannot entnext passed the last entity. There are 2 things:

1. How to retrieve the # of entities in a block without cycling through it.
Or
2. A quick lesson in the *error* function, I cannot figure out how to implement this. I basically want to to say:

(if (entnext myent)) returns a error, don't abort & continue on.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Diesel Expression For Attribute And Dynamic Block

Mar 15, 2013

I have a task where I need to automatically insert the drawing number (no path), plus two additional items, one an attribute, the other is within a dynamic block. I can achieve this using fields but now I havce to truncate some of the text.

It seems like I can't edit if I am using fields and attributes/blocks can't be used in Diesel (correct me if I'm wrong)

This is the information I have:

Filename: 123456-AS-WE.dwg
Attribute: Q2
Dynamic Block: X1 - Additional Information

This is what I require: 123456-AS-WE [Q2] [X1]

This is what I have so far: 123456-AS-WE [Q2] [X1 - Additional Information]

In other words, I need to restrict the dynamic block field to the first two characters.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Dynamic Block With Visibility State Pre-selected?

Dec 24, 2013

I currently insert certain dynamic block into drawings with a short function that first inserts the specified dynamic block and then immediately changes the visibility state to one specified as an argument to the function.

I'm wondering if it is possible / better / faster to somehow insert the dynamic block with the decided visibility state simultaneously. I've been amazed by many capabilities of VL so I wouldn't at be surprised if this can be done. (the dynamic blocks I'm inserting could have many multiples in the drawing but I need this method to only affect the one being inserted at the time the function is called. I currently use entlast to decide which one is being inserted.)

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Dynamic Block And Modify Stretch Points

Nov 30, 2010

I have a dynamic block that I would like to insert via a lisp routine. When the routine is run from my menu I would like to select two points on the drawing area. Then I would like my dynamic block to be inserted at one of the points I selected and then I would like a specific "point" of my block to be stretched to the other point that I selected. I was wondering if this is possible with LISP? I have my old LISP program I wrote that draws a leader and then inserts my block but that was before I started working with dynamic blocks.

Here is my current

(defun c:wldsym()
(setq osnapold (getvar "osmode"))
(setq orthold (getvar "orthomode"))
(setq dimsc (getvar "dimscale"))
[code]...........  
  
wld1r.dwg is my current block. It has some dynamic properties already. But I'm trying to add new properties that can be seen in my working test drawing wld1r-new.dwg

When using my code with "wld1r.dwg" you can see how everything behaves right now. Then open "wld1r-new.dwg" and note that the insertion point and a stretch point my default are in the same spot. Work with the two stretch points and look at how the block reacts.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Count Dynamic Block Including Total Length?

Apr 2, 2012

lisp to count dynamic block including total length.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Invisible Attribute Constant Dynamic Block Visibility State?

Jan 24, 2013

I have a dynamic block with several visibility states, and each visibility state has one invisible-constant attribute. I can't seem to wrap my head around dynamic blocks well enough to get the value from the active visibility state invisible constant attribute. I know how to get the visibility state like this:

(setq ss (ssget "_x" (list '(0 . "INSERT") '(2 . "`*U*,<DynBlockName>") (cons 410 (getvar 'ctab)))))

 but what next?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Dynamic Block Based On Previous Selected Point

Apr 9, 2012

For a program i am working for i have to extract the base point of a dynamic block.

This can be done perfectly by this function:

(cdr (assoc 10 (entget (car (entsel)))))

But i want the entity selected based on a previous slected point. So for example when i selected pt1 (which is a point at the border of the dynamic block) i want to be able to extract the base point on the block whit this point.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Dynamic Block Property (Scale Uniformly) Automatically

Dec 16, 2010

How to change the Scale Uniformly property in dynamic blocks accross hundreds of drawings using either/or scripts, lisp, vba or anything else that might do the job.

I just need to open the drawing and select the block (one block per drawing) then edit the scale uniformly property within the block, save then close the drawing and move onto the next drawing.

View 4 Replies View Related

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 :: Retrieving Block Name Of Anonymous Block

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

AutoCAD Visual LISP / AutoLISP :: Block Insertion Routine Based On Block File Name

Apr 5, 2013

Create a routine that looks for a block based on a portion of that block name, using a specified path or search path. 

For example, block to search for is BLOCKABC123, so if someone inputs ABC or 123 as a block name, it will locate that block within that folder and inserts it into the drawing at a user specified location.

Ideally, if there is a check in that if it finds more than one match, then perhaps it flags or prompts you to choose 1, 2, or 3 option which block to use.  But I can live without this special function if it requires too much time to code.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Match Multiple Attribute Values From One Block To Another Block

Feb 12, 2012

I need to match few attribute values from one block to different block. I download a lisp file called; ca.lsp which can match the single attribute value. I modified it for more than one attribute value matching. It is ok but still wish to overcome two issues for batch prcess

1. picking up the blocks by selection

2. click the alternative block numbers of times to match the numbers of attribute values I needed.

How to modify this lisp I can run it by block name selections instead of picking selection which enable me to run batch process for numbers of drawing? That will be good...

Lisp & Demo file attached (Match attribute value, A, B & C to Attribute 1, 2 & 3).

View 3 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 :: Block To Annotative Block?

Dec 23, 2013

I have a dwg with 40 blocks that have a non-annotative property. I can go through 1 by 1 and change the property to annotative and redefine the block. Is it possible to automate this? I have done some google searches but have not found anything I am able to cut and paste or put together to get it to work.

Civil 3D 2012 SP4.0 Windows 7 Enterprise 64-bit
C3D 2014 SP1
Dell M6600, Core i7 @ 2.3GHz, 16 GB ram
Dell T3500 workstation, too much ram to post

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Parameters Dynamic Blocks

Feb 20, 2012

I'm using the attached lisp to change the parameters of a dynamic block. In particular, I use the function chgdynprop

(defun c: test () (setq oggfreccia (car (entsel))) (chgdynprop (Vlax-ename-> vla-object oggfreccia) "Distanze1"300.0))

The lisp function works properly, because if I select the block from the bar I can see that property Distanze1 = 300.0

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using It To Manipulate Dynamic Blocks?

Mar 8, 2013

I'd like to use AutoLisp to modify and in some cases replace existing dynamic blocks in a drawing.  How can I retrieve existing values and then modify values for the following:

1. Visibility states

2. Distances

3. Rotation angles

4. Flip states

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Count Dynamic Blocks

Dec 17, 2012

Lisp routine to count the number of dynamic blocks of a specific name ("FD") by windowing an area of the drawing. I have a routine that I've been using to accomplish this, but i don't understand why it doesn't count dynamic blocks.

(DEFUN C:LOCATEFD(/ BLKNAME BLOCKSET TOTAL)
(SETQ BLKNAME "FD")
(PROGN(SETQ BLOCKSET(SSGET(LIST(CONS 2 BLKNAME))))
(IF(= BLOCKSET NIL)

[Code] ....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dynamic Blocks Visibility To Text?

Mar 16, 2012

I wonder if it is possible to have a routine that captures the visibility name of a dynamic block and place it in a text in the drawing?

For example, I have a block with 10 visibilities. I copied this block 10 times in the project and I put each one with a different visibility. Now I would like to make a label with the name of each visible state next to each block.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Opening DWG Containing Dynamic Blocks Using Scripts?

Apr 22, 2012

how to open an dynamic block DWG using a script and not have the "This drawing contains authoring elements. Do you want to open in block editor" message?

I cannot seem to get rid of this message and everytime I have to manually say "No" and let the script run.

View 1 Replies View Related







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