AutoCAD Visual LISP / AutoLISP :: Delete Duplicate Menus

Apr 20, 2011

A plugging we use has just updated and loading double menus causing error messages prompting that menu already exists unable to load.

In my cui the menus are loaded in my enterprise as well as my main.

How do I keep the menu with the same name in my enterprise yet unload the one of the same name in my main (where it shouldn’t be) using lisp (I want to Automate this using lisp, since I'm not always in office at the same time as everyone else)?

View 1 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Creating Menus In Command Prompt?

Nov 22, 2011

I am able in lisp to create a command prompt selection menu, easy (see code below).However what I want is for the lisp to be ready to undertake an action UNLESS I select an option.

An example is the offset command wich has a function ready to roll (namely the specify offset distance) "OR" I can interrupt the "specify offset distance" and enter one of the sub options (in the case of offset Through/ Erase/Layer).

My code attempts to offset also, UNLESS the user wishes to specify a distance.
 
(DEFUN C:loadoffset ();CREATING MENU FOR SUB COMMANDS [GETIT] [GOTIT]...(setq choose (getstring "
Select an option... [1=GET DIST] [2=GOTDIST]: "))(if (or (equal choose "1"))(GETIT))(if (or (equal choose "2"))(GOTIT));TERMINATING SELECTION MENU...)(defun getit ( gotit )(setq MYDIST (getdist "
SELECT A DISTANCE: "))(gotit))(defun gotit ()(command "_offset" MYDIST pause pause"exit"))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Show / Hide Menus In Workspace

Oct 17, 2012

I have a bunch of discipline specific menu files as partial cui's to my enterprise menu. I don't want to show them all, as some users may not need them all. What I would like to have is a menu item

Load Menus ->

Civil
Electrical
Mechanical
Structural

and when they click on one of them the relevant menu file is made visible in the current workspace. Is there a simple way to do this?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Shortcut Menu In Partial Menus?

Aug 26, 2008

I have made an extra CUI that is loaded as a partial CUI.

Now I want to add a context-sensitive shortcut menus like this: POP504, OBJECT_AEC_DOOR.

The problem is that this shortcut menu only shows up if I add the shortcut menu to the main CUI file. If I add it in some partial CUI it never shows.

Does shortcut menus only work from within the main CUI?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: ID Duplicate Text

Jul 24, 2013

This is a routine that draws a line between duplicate text.

Would it be possible to have the line as bold red p-line so that its easier to identify.

;; This AutoLISP routine examines all the user-selected TEXT and MTEXT items,
;; and draws a line on the current layer between any two that have identical
;; string values.
;; Leading and trailing blanks spaces are ignored.
;; %% modifiers, like %%u, are not ignored.
;; Upper- and lower-case differences are not ignored.

(defun c:fdt () ;;Find Duplicate Text

(prompt "Select text items to examine: ")
(setq ss (ssget '((-4 . "<OR") (0 . "TEXT") (0 . "MTEXT") (-4 . "OR>"))))

(setq n 0)

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Add Customized Menus / Settings From Standard To Architecture

Nov 12, 2013

How do I tranfer all my standard autocad variable settings into a new version of Architecture? I have my dimensioning settings, etc set a certain way in my standard autocad and now I want to start using Architecture but need all my old settings.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Partial Cuix - Adding Commands To Shortcut Menus

Oct 17, 2013

I'm able to add custom panels/buttons into the Ribbons, by cloning the existing ribbon (from acade.cuix) into my partial cuix. However.. I'm not able to add more commands to the shortcut menus, using the same technique.

Is it possible to add custom commands to existing shortcut menus using a partial cuix?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remove Duplicate Points From A List?

Aug 5, 2013

I am looking for code to remove duplicate points (xy coords) from a list with a fuzz factor parameter.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Duplicate Text String

Jun 11, 2007

In order to avoid duplicate text string in different places in the same drawing, I would like to have such a tool to find duplicate text string.

For instance, I want to put numbering of some connection lines, I do not want to have different lines but have same number by mistype.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Duplicate Text / Highlight With Any Color

Nov 27, 2013

find duplicate Text & highlight with any color (numbers or text string) ? I have a drawing and have to find duplicate text string, file is bigger and need make this automatic find, & highlight the duplicate text.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script To Change Duplicate Tag Names And Their Values?

Jun 17, 2012

I need to change the value of some tags in a title block on multiple drawings. I tried using Lee Macs attribute changer [URL]. It works fine but not when tags have the same name.

I then looked at this code - [URL]

Idea was to change the tag names then use Lee Macs program. It too fails when there are duplicate tag names. It changes all tags not just the one I want.

In the the title block I have 3 tags with the name "NAME" but only one will have the value I'm looking to change. If I could place an IF statement some where in the above codes (or another code altogether) to instruct that IF the tag name is "NAME" with value "Dennis (BSL)" then change either the tag name or the value to "Daniel"

Im pretty bad at this programming stuff but with so many drawings I need a easier, automated way of doing this.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Can't Delete All Layouts?

Mar 4, 2013

Why can't I get this to work?... okay, it is being used via AcCoreConsole.exe

I get the following...  

; error: bad argument type: VLA-OBJECT nil

(defun delAllLayouts ()
 (vl-load-com)
 (vlax-for item
    (vla-get-Layouts
      (vla-get-ActiveDocument
 
[Code]....

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All OLE Objects From Drawing

Nov 26, 2012

how to delete all OLE objects from drawing by most efficient way.

There are abt 150 drawings, each has from 2 to 20 or so OLE objects which need to be deleted. OLE objects are on many paper spaces.

I tried to use qselect but it selects only what is in current space.

Would need some lisp or some other methode than all can be deleted (excluding those which resides in blocks).

Tried also yto use ssx and then erase but still it deletes only what is on current space.

Just as additional info, those OLE are all pictures, not xls files for example.

View 8 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 :: Delete Offset Line

Sep 6, 2013

There are many lisp that draw offset line but what about opposite way , I have wall of double line i need to delete one of them let's say inside wall line .

why i need to do this usually when i tracing in external program like autocad architecture or Revit or archicad  i just need outline of exterior and interior walls !.

is there way that can delete the offset line  ?(or within range predefined in lisp to prevent interfering of lines deletion).

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Text Style Not In Use?

Nov 29, 2012

I cannot purge a textstyle out of my drawing. When I run purge nothing is available.

However if I select the style from the style dialog I am able to select delete and delete the style.

When I use the method on the style (vlax-invoke-method style 'Delete). AutoCAD states:

Automation Error. Object is referenced by other object(s)

The style is defenatly not in use but may have been used in the past.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layer State Delete

Feb 20, 2013

i have a small lisp and i would like for it to:

when i invoke the plot command, it will first check if there is a layer state called "Temp"if "Temp" exists, then delete "Temp", then re-create "Temp", then switch layer state temporariliy to "Plot" to plot the file, and then switch back to the "Temp" layer state againbasically, the "Plot" layer state will be set based on how the drawing(s) will plot. if a user makes changes here-n-there in the drawing, when the user wants to plot, the software will save current state as "Temp", plot using the "Plot" state, and switch back to "Temp" state at the end. all i am trying to achieve is to somehow over-write the "Temp" state. below is the LISP.
 
(command "undefine" "plot")
(defun clot ()
(if (layerstate-has "Temp")
(layerstate-delete “Temp”)
)

[Code]....

Civil 3D 2013 SP1, Win 7-64 bit
12GB RAM

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Delete Linetype In Drawings

Nov 6, 2013

I have some drawing that contains PHANTOM2 linetype.

I can't delete this linetype from my drawings!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete DWG File Properties?

Mar 5, 2010

I am looking for code that will delete all the properties within a DWG file.

Searching the forum, I found the following

; Remove any existing Properties
(dictremove (namedobjdict) "DWGPROPS")

However, further research (forum, testing and help system) indicates that it no longer applies to current releases of AutoCAD so my initial happiness was short-lived!

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Empty Block?

Jan 29, 2013

The below gets the block names of empty block records. The blocks may or may not be actually inserted in the dwg. In my case though, apparently they are nested in other blocks in the drawing I am working with... but it looks as if they are part of deeply nested block definitions and therefore cannot be purged.  I checked a couple blocks (the code returns over 1000 in my case) it returns and there are no objects in its definition.

How can I force them out of a drawing - and hopefully reduce it's file size?

(defun NullBlocks (/ block *thisdwg* block nullblocks)
(setq *thisdwg* (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for block (vla-get-blocks *thisdwg*) ;iterate block table
(vla-get-Name block)
(if (= 0 (vla-get-count block))
(setq nullblocks (cons (vla-get-name block) nullblocks))
)
)
nullblocks
)

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete And Purge Block By Name

Sep 30, 2013

I would like to use a lisp routine to open all the files in a selected folder, search for a blocks by name, delete them, purge the drawing, save and close.

Is there a routing that can be used to do this?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All Empty Layouts From Drawings?

Mar 10, 2004

I am trying to create a lisp to delete all the empty layouts from mydrawings. I do not see any code to control this.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Files Named In List

Aug 19, 2012

I have list like (C:projectspr0310.dwg  C:projectspr0315.dwg C:projectspr03drawings17.dwg)

Want these three files deleted from C:projectspr03.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete A File Every Time CAD Is Fired Up

Sep 9, 2011

trying to delete a file every time CAD is fired up and/or a new drawing is opened. i cannot make it work so far. planning to incorporate it into acaddoc  lsp file.

(defun deletestupidfile()
(vl-load-com)
(setq myname (getvar "loginname"))
(if (= (getenv "PROCESSOR_ARCHITECTURE") "AMD64")
(progn
[code]...

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Block From Multiple Layouts

Apr 26, 2012

I got a model-file with several layout tabs and I want to delete a block in all layout tabs.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Toolbar From Partial CUI Menu

Feb 15, 2013

I have a company .cuix menu that is loaded as a partial menu to the main acad.cuix file. I want to delete all the toolbars and pull down menus associated with it and leave the other stuff in place. This is in Autocad 2011 but should also translate to 2013. So far, I have tried opening the CUI menu, going to the company.cuix partial menu and deleting the toolbars. Then I hit save, then Apply. Toolbars disappear and pulldown menus go away. But when I reload AutoCAD they come back.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Lines Shorter Than Specify Length

Nov 8, 2002

Is there any utilities that can select the entire drawing with the 2d polyline and erase all the polyline less than specify length (eg:10m,20m etc) ?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All Objects In All Layers Except One Layer?

Jul 29, 2013

lisp program to delete all objects in a drawing based on Layer excluding one layer objects.

in AutoCAD.

Example : I may have 10 layers in a drawings like 1 to 10. I need to delete all objects on 2 to 10 layers.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Toggle Between Customized Old Style Menus / New Style Workspaces?

Nov 13, 2011

Is there a way to toggle between customized old style menus and new style workspaces?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Vertex From 3D Pline Without Making New Entity?

Dec 6, 2007

I have a program that makes 3d polylines from various data. That 3d pline then gets added to a civil 3d surface as a breakline. I want to modify the pline with my program, but preserve the handle, as I think that is what C3D uses to decide if its part of the surface. I tried this as a sample with no luck:

;DELETE 3RD VERTEXT FROM 3D PLINE
(DEFUN C:T3 ( / EN ENAME ENT ENTL)
;GET 3D PLINE
(SETQ ENT (ENTSEL "
Select 3D Pline:")

[Code] .....

I know you can modify a vertex, but what about add and delete with entmake and entmod? I also considered using activex for this task, but you can only add verticies from what I could tell in the object browser of VBA, not delete them.

What I will be doing is deleting all the verticies and adding back the correct ones. Or if there was a way to transfer a handle to a new entity after deleting the old, that would suffice too.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All The Dimensions Inside Selected Block?

Dec 2, 2010

I need a lisp routine which will delete all the dimensions inside selected block or blocks, including nested blocks inside.

View 9 Replies View Related







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