AutoCAD Visual LISP / AutoLISP :: ObjectDBX Access To Block Definition

Feb 22, 2013

Can't you access the block definition via ObjectDBX.

(without the dwg file being open)

I am parsing through the blocks to find all the xrefs. 

When I get to an XRef... I don't seem to find a way to check if it's an XRef.

View 4 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Bounding Box Of Block Definition

Nov 8, 2011

How i can calculate bounding box of a BLOCK definition ? I know after inserting a block, we can get bounding box of a block reference.

But how can i get bounding box before insert? Assuming that i never going to scale or rotate it.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Move The Selected Object Using ObjectDBX

Aug 7, 2013

Using Nentsel function, I can get info on a object that is nested with an Xref. Is there a way to move the selected object using ObjectDBX?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Purge Using ObjectDBX Is Deleting Dimensions

Dec 21, 2012

I'm working up a routine to simplify clearing some space. I've been cruising here and other places piecing together something, but what I have ended up with is a routine that deletes all of the intended information (possibly needing repetition for those hard-to-reach blocks), but also deletes dimensions from the model space.

There are several things our company does which are "non-standard" but we have been at it for a while and I am trying to work with what I was given. Following is the code.

;;; not sure who Jeff M is, but assuming this bit is from him(defun odbx-test (/ dbx_doc) ;; edited 5/28/06 by Jeff M (if (< (setq dbxver (atof (getvar "ACADVER"))) 15.06) (progn (alert "ObjectDBX method not applicablein this AutoCAD version" ) (exit) (princ) (gc) ) (progn (if (= (atoi (getvar "ACADVER")) 15)(progn (if (not (vl-registry-read "HKEY_CLASSES_ROOT\ObjectDBX.AxDbDocument\CLSID" ) ) (startapp "regsvr32.exe" (strcat "/s "" (findfile "axdb15.dll") """)
[code]....

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bind Xref Via ObjectDBX Without Opening

Feb 11, 2013

is it possible to bind an an xref via ObjectDBX without opening the drawing?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extending Attribute Definition

Jul 6, 2012

I am trying to customize AutoCAd for a special domain where attribute values need to have a type. I can have a clean integrated solution by manipulating the acad.dcl or base.dcl .I am using AutoCAD 2012 . I want to extend the " define attribute" and "edit attribute" dialog boxes to promt the user for a value type when they define an attribute .I can't find the definition for these dialog boxes in acad/ base dcl files. Ideally I want to add another tile definition to these dialog boxes .If that is not possible atleast spawn a different dialog box  from the "define attribute " dialog box that will collect the value type from the user.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Compiled Function Definition Error

Aug 17, 2012

The error below has appeared randomly when AutoCAD 2011 is started.  There was not an error of this sort, but it suddenly appeared and some of the LISP routines will no longer work. 

*Invalid attempt to access

a compiled function definition.  You may want to define it using defun-q:

#<SUBR @000000003f5fda98 S:: STARTUP>

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: STRNUM Error - No Function Definition

Jan 10, 2012

I D/L a lisp file (setvars.lsp) that purports to give a list of system variables that match a short string entered in a dialog box.

Unfortunately, an error arises that says 'error : no function definition: STRNUM'

I've looked at the code and can't tell what the writer was hoping to achieve.

The specific section is as follows:

    (if F1
      (progn
        (setq RL (read-line F1))
        (while RL
          (if (and (wcmatch (strcase RL) (strcase (strcat "*" DESCR1 "*")))
                   (wcmatch (strcase RL) (strcase (strcat "*" DESCR2 "*")))
[Code] .........

There is no other mention of STRNUM in the whole of the lisp.

There is an accompanying setvars.dat, wherein apparently, the writer compiled a data file of all the system variables in AutoCAD2008, each variable being followed by an '=' and then a description of the variable.

If necessary I can post the whole lisp and dat file, but was hoping to discover the intention from the above extract and therfore where I might work out an alternative to this line.

Looking to turn a string to a real? If so, why are there two 'arguments' following the 'function' STRNUM?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Data From MS Access?

Dec 19, 2011

I woluld like to use visual lisp to get data from ms access.

I know how to connect to Excel, but is there a similar connection possible for access ?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Access Text In MTEXT Entity

Dec 29, 2012

I am wanting to use autolisp to access the text in a MTEXT entity.  assoc(1) gives me the first bit of text, but not the rest.Is there a way to use assoc to access each of a number of matches or do I need to write my own routine to find all the 1's?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Start MS Access 2010 In Runtime

Oct 13, 2013

I try to start msaccess in runtime mode, but an .accdr will not start.this is the code try to use, without /runtime in the code the .mdb and .accdb works great

(startapp "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" /runtime path)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: No Function Definition With Distance Function

Oct 25, 2013

This seems absolutly silly.

(setq p1 (getpoint))
(setq p2 (getpoint))

(setq Dist (distance p1 p2))

Why does this not work?

I'm trying to build a command to replace AutoCAD's "DI" command, to give distance and delta x, y, and z values in decimal and imperial, and keep the angles in XY plane and out of XY plane.

View 9 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 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 :: 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 :: Can Add Named View Control To Quick Access Toolbar?

Dec 8, 2011

I've made a failed attempt to add the RIBBONCONTROL Named Views to the main Quick Access Toolbar. The Customize User Interface dialogue box (CUI) seems to allow me to drag the Named Views  RIBBONCONTROL from the command list to Quick Access Toolbar 1. I don't see the "forbidden" icon and the blue insert bar shows up when I perform the drag operation.

However, I suspect there is some compatibility issue, because the command doesn't pop up when I release the mouse button at the end of the drag operation. Using command QUICKCUI and trying to drag Named Views RIBBONCONTROL directly to the Quick Access Toolbar (on screen) seems to be allowed likewise, but doesn't work also.

Using the regular View Manager Dialogue is not the kind of solution I'm looking for, because in the View Manager it takes at least twice as much mouse clicks to change to another view.

Any way to reach the desired customization? Should it be reported as a bug to Autodesk?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selection Set By Block Name?

Mar 2, 2012

I am trying to select all blocks of a certian name. I am using the following:

(setq ss1bk (ssget "_X" (list (cons 2 blkname))))

My issue is that this will not select any dynamic or attribute blocks that are not at the default insert state. 

how to select all of a block by name including reguardless of current state?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Odd Insert Block

Sep 26, 2013

I have a routine that counts dynamic blocks by visibility state and stores that information then prompts for scale and color and stores that information. Then a legend begins to build from the data and a collection of blocks to reflect the dynamic blocks and their visibility state. Everything works great on all of the machines around the office except on one. When the legend begins building, the one user is getting the DDATTE dialog instead of allowing the values to populate as expected. So, I had him change ATTREQ to 0 an run again. No deal, the same thing happens again and again. And; it only occurs on the one machine.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Block Name To VLA-object?

Feb 21, 2013

I need to get VLA-Object from block name.

here there is a code to get block name from VLA-Object:

(vlax-get-property obj (if (vlax-property-available-p obj 'EffectiveName) 'EffectiveName 'Name) )

 but I need the inverse of this code exactly:

blockname(as a string)==>VLA-object

(defun GetVLA_BName (BName).......

so, how can I do it?

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 Visual LISP / AutoLISP :: How To Get Attribute Value From Block

Jun 17, 2013

I continue with my problems.....

I get attribute value from block and put it in a list:

(repeat (setq cnt (sslength sset))
      (setq attValue (GetAttributeValue (ssname sset i) "tag1"))
       (setq attValue2 (GetAttributeValue (ssname sset i) "tag2"))

 [Code]...

When I try to put them in a table...

 (foreach item lst
        (vla-setText mytable
                     row 0
                      (last item)
                    )
        (setq row (1+ row))
      )   

only put  one ( attValue2) at column, and i like  put 2 values, each one in a column in the same row

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Put New Block Over Old One Using Properties

Aug 5, 2013

I would like to select all instances of a block, and put a new block on top of them using the same properties (insertion, rotation) but am unsure how to do this

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Fix A Block Attribute

Mar 29, 2012

I need fix a block attribute named "NrPunct.dwg"

MyProblem:  after I insert the block “NrPunct” in my drawing ,, I cannot modify "textHeight", when I edit the ATTDEF (or attribute) with the command “DDEDIT” . Why?

You see my arrow in the picture pozamea.jpg…

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Use Block With MLEADER

Sep 27, 2010

We have a block contain 10 attibs to be seen with 8 differents scales making 80 attribs!  (We use that before Annotative features). When we edit this block, we have a LISP that ask for the 10 avlues, and copy it for all the scale.

This lisp use the block ename in argument.

We start to use that  block with MLEADER, but we can not edited with our lisp (can not find the ename of the block in the MLEADER definition ).

Is that a way to find this ename, and to be able to modify (our substitute) all the attributes value.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Specific Block

Feb 13, 2013

I need to delete a specific block from current opened drawing by LISP command.

for example removing XREF attached is very easy:

(COMMAND "-XREF" "D" "FRAME")

I can remove "FRAME" XREF from drawing. Now, I want to delete a/all block with "TB12" name with same action!

(command "BlockDelete" "TB12")

so, how can I delete a/all block with specific name in current drawing?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Edit Attributes Of A Block

Aug 6, 2013

I have a block named "WD_MLRH". There are 3 specific attributes which I want to change in it. The attribute names are.

RUNGCNT, RUNGDIST and RUNGFIRST.
RUNGCNT will = 20
RUNGDIST will = 1.0 (or 1 will suffice)
RUNGFIRST will be decided by a user input.

Something along the lines of...

(setq RUNGFIRST (getint "Enter first rung number: "))

I'm sure this is completely wrong, but i hope that portray what I'm trying to accomplish.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Use User-input As Block Name?

Sep 5, 2012

I just need the userinput to be incorporated in the insert command but don't know how to segregate the block name from the block path..

;;;PROMPT USER FOR BLOCK NAME HERE
(setq userinBLKNAME (getstring "
Please type in the block name shown in the allrevblocks - ex: IFCC4:"))

;;;INSERT BLOCK BASED ON BLOCK NAME PROVIDED HERE
(command "-insert" "B:\CAD\REVBLOCKS\IFC\"USERINBLKNAME PAUSE "1" "" "")

View 3 Replies View Related







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