All Activity
- Past hour
-
cpfranks joined the community
- Today
-
patjeacad joined the community
-
tombu started following STRIPMTEXT doesn't remove all overrides
-
STRIPMTEXT doesn't remove all overrides
tombu replied to ElAmigo's topic in AutoLISP, Visual LISP & DCL
For versions newer than 2021 you need to set the system variable LISPSYS to zero (LISPSYS=0) and restart AutoCAD for this and other older code I still use to function correctly. https://www.theswamp.org/index.php?topic=31584.msg608557#msg608557 He talked about a v5.0d version coming soon but I've never found it anywhere. He may have gotten frustrated when the code he put so much time into no longer worked as expected with AutoCAD's default settings. -
I guess it depends on which version you're using. At some point the wizard that creates your DXE file should give you the option of sorting on a column. You pick the column(s) and specify ascending or descending order. If that doesn't help, please provide more information. How are you creating the DXE file? What types of data are you extracting, and what are you doing with the data? Welcome to the forum!
-
yazun109 joined the community
-
my drawing is not fitting onto my paper space please help??? begginer
CyberAngel replied to antons99's topic in AutoCAD Drawing Management & Output
Select one of the layouts at the bottom of the window. You will see your paper space, possibly with a viewport included. If you don't have a viewport, use the VPORTS command to create one. Double-click in the viewport. That will put you in model space. Use the ZOOM Extents command. That should bring your linework into the center of the viewport. If you need to print to a scale, you'll have to adjust the viewport scale (one of its properties) or the size of the viewport itself or both. Once you have the viewport how you want it, plot it to your PDF plotter. The details will depend on the configuration of your system. It will take some experimentation the first time you do this. Don't be afraid to make mistakes. Welcome to the forum! -
STRIPMTEXT doesn't remove all overrides
SLW210 replied to ElAmigo's topic in AutoLISP, Visual LISP & DCL
There is a version 5.0d around, further down the page where you linked in your other post, it seems to address the issue. v5.0d ??cadffm?? ;;;; Revised regular expression for Height format - ;;;; e.g. for format like this: H0.400000 Also, John Uhden has an Unformat LISP he mentions in the same thread, that might do what you need. Please post your amended code if you don't mind, others may find it helpful. -
Lee Mac started following Converting Lines To Polylines and Un-dynamic a block - LISP
-
Adding Command Line Confirmation to Simple LTSCALE Program
Clint replied to Clint's topic in AutoLISP, Visual LISP & DCL
BIGAL, Sure! I would like to check out the reactor-based code. Make it available at your earliest convenience. Thanks, Clint -
3D printing cylindrical objects.
rwleigh replied to rwleigh's topic in AutoCAD 3D Modelling & Rendering
If anyone wants to print a funnel for themselves, i have put both the petrol and diesel versions here: Fuel funnels. -
dexus started following Converting Lines To Polylines
-
All the functions that use PEdit -> Multiple -> Join could (in my opinion) be improved by setting the fuzz to 0.0 in the code. Because if you just press enter "" after "_J" the previously used fuzz is used, which might give an undesired effect. An example of what can happen is shown in the image below. So just replace the "" after "_J" with "0.0", and the fuzz is always reset to 0: (command "_.pedit" "_m" ss "" "_j" "0.0" "")
-
AFor joined the community
-
get polyline area by clicking at the polyline itself
zwonko replied to Bikey_4's topic in AutoLISP, Visual LISP & DCL
Thanks @BIGAL. Thought about that, that geometric center is not always inside polyline. Using QGIS, it also can label in center of polyline but it also have option "force point inside polygon". I'm curious about the algorithm that controls that. For me, most problem is "L" shape polylines. Thought that algorith in QGIS could be something like that it is finding geometric center or something like here in ATM code: https://jtbworld.com/autocad-areatext-lsp After finding center (geometric or like in ATM) it is finding intersection with horizontal (or vertical xlines). After that, sorting X (or Y for vertical) and find if center is before/inside/after X of intersection. After that, choose/calculate new X. -
STRIPMTEXT doesn't remove all overrides
ElAmigo replied to ElAmigo's topic in AutoLISP, Visual LISP & DCL
I used Lee Mac's Unformat String, this one works. It does need some workaround when I use it on dimensions to not remove diameter symbols but that was an easy fix. -
Autocad drawing in dwg convert to lsp file
fuccaro replied to Danial's topic in AutoLISP, Visual LISP & DCL
Nice! Once I wrote a Lisp to draw and simulate the work of an Enigma machine. Unfortunately I can't make it work. It draws the machine on the screen, but when it comes to encrypt a text... well... it works only on my computer -from others I got only bug reports Anyway, that's an other example when there is nothing on the screen, the user starts a lisp and it makes the job. -
hello, is there a anyone up there have a idea where can i get some dwg of Leak Mead, i don't mind to pay as long as not overpriced. thanks
-
bgurcan joined the community
-
jyoslens01 joined the community
- Yesterday
-
What do you want to do maybe one of these. Copy atts in block to all similar blocks in layouts, fill in one 1 block attributes and blocks are updated in all layouts. Update sheet X of Y Update 1 attribute in all blocks using a dcl to select Please explain more. Ps make an Index from title blocks.
-
KiwiCADMonkey joined the community
-
STRIPMTEXT doesn't remove all overrides
BIGAL replied to ElAmigo's topic in AutoLISP, Visual LISP & DCL
"I am pretty sure John Uhden is still around." Sure is alive and kicking over at forums/autodesk. I will send a message to him asking to look at this post. -
Adding Command Line Confirmation to Simple LTSCALE Program
BIGAL replied to Clint's topic in AutoLISP, Visual LISP & DCL
There is a very advanced method using a reactor can type L4-25 and the ltscale will be set to that, L10, l2 etc. It uses an error trap in a reactor as what is typed does not exist so an error occurs, I currently have Circle, Offset and Fillet using this. You are limited to 26 options ie A-Z. C10 O5 F23 So in summing up if you have lots of ltscale to use could be helpful. Just ask. -
Autocad drawing in dwg convert to lsp file
BIGAL replied to Danial's topic in AutoLISP, Visual LISP & DCL
Whilst we wait for you Danial. Something like this. window frame.mp4 -
get polyline area by clicking at the polyline itself
BIGAL replied to Bikey_4's topic in AutoLISP, Visual LISP & DCL
This may help (setq pt (osnap (vlax-curve-getStartPoint obj) "gcen")) ; obj is a VL object But note if you have say a "U" shape pt may not be inside pline. -
Retrieving an object's ID from within a block
BIGAL replied to cagorskij's topic in AutoLISP, Visual LISP & DCL
Another example (defun wow ( / obj atts att) (setq obj (vlax-ename->vla-object (car (entsel "\nSelect a block object ")))) (setq atts (vlax-invoke obj 'Getattributes)) (foreach att atts (princ (strcat "\nTag name " (vlax-get att 'Tagstring) " Att value " (vlax-get att 'Textstring) )) ) (princ) ) (wow) If you know a tag string you can check for a single attribute. -
This will exit code if block does not exist (if (not (tblsearch "BLOCK" "POINT")) (progn (alert "The block POINT does not exist in this drawing.!!!\nPlease insert block POINT\n\nWill now exit") (exit)) )
-
This work better (if (not (tblsearch "BLOCK" "POINT")) (alert "The block POINT does not exist in this drawing.!!!\nPlease insert block POINT") )
-
First post. Can the DXE file be in any order or is it stuck just ascending or descending?
-
dmg joined the community
-
HI Steven P.I fix the problem. I add in the beginning ((and (not POINT)) (alert (strcat "The block POINT does not exist in this drawing.")) ) Thanks
-
Steven P started following Help: Insert Block lisp and Change attribute via lisp?
-
would this help? https://lee-mac.com/macatt.html
-
So before the new 'if' line, what is the value of pnt? Add maybe (princ pnt) so you can see what it is. However consider the 6 lines just before this, pnt is always being set, either as (caddr pnt) or as dt1
-
STRIPMTEXT doesn't remove all overrides
SLW210 replied to ElAmigo's topic in AutoLISP, Visual LISP & DCL
Lots of extra codes in that link to work around some of the problems as well. Maybe LeeMac's code will work for OP. If OP can't post the text, not much specific can be done IMHO. -
I try this (defun c:myblock(/ lPointList scl scl1 dt1 pnt pointsToList) (command "_layer" "_m" "Block" "_c" "142" "" "") (defun pointsToList (/ ssPoints iCounter ePoint oPoint aAttributes vAttributes oPointTag sTag lPoints lCoord ) (setq ssPoints (ssget "X" '((0 . "INSERT") (2 . "POINT"))) iCounter 0 ) (repeat (sslength ssPoints) (if (and (setq ePoint (ssname ssPoints iCounter)) (setq oPoint (vlax-ename->vla-object ePoint)) (setq iCounter (1+ iCounter)) (= (vla-get-hasattributes oPoint) :vlax-true) (setq aAttributes (vla-getattributes oPoint)) (setq vAttributes (vlax-variant-value aAttributes)) (setq aAttributes (vlax-safearray->list vAttributes)) (setq oPointTag (car aAttributes)) (setq sTag (vla-get-textstring oPointTag)) (setq lCoord (vlax-safearray->list (vlax-variant-value (vla-get-insertionpoint oPoint)) ) ) ) (progn (setq lPoints (append lPoints (list (cons sTag (list oPoint lCoord))) ) ) ) ) ) lPoints ) (setq lPointList (pointsToList) scl (getvar "useri1") scl1 (* scl 0.0025) ) (while (progn (initget 128) (setq dt1 (getpoint "\n Insert Point or Number of point: ")) ) (progn (if (= 'STR (type dt1)) (setq pnt (assoc dt1 lPointList) pnt (caddr pnt) ) (setq pnt dt1) ) (if pnt (command "_.insert" "c:\\library\\myblock.dwg" pnt scl1 scl1 0) (alert "No POINT found") ) ) ) (princ) (command "setvar" "clayer" "0") ) But gives me Error: incorrect type - nil