Recent Posts

Pages: 1 2 3 [4] 5 6 ... 10
31
AutoLISP (Vanilla / Visual) / Re: Help : Move Block
« Last post by Lastknownuser on July 23, 2024, 01:37:16 AM »
If I change 10 codes in Block's Entity List, the Text included in Block does not move, so should I move the Text individually?

you need to select block's attribute that has that text (ATTRIB), then change that attribute code 11 to move it to a new position
here is some quick example where you select the block and new point, and it changes position of first attribute text
Code: [Select]
(setq blkename (car (entsel)))
(setq newpt (getpoint))
(setq attename (entnext blkename));first block attribute
(setq attename_lst (entget attename))
(setq attename_lst (subst (cons 11 newpt) (assoc 11 attename_lst) attename_lst))
(entmod attename_lst)
32
AutoLISP (Vanilla / Visual) / Help : Move Block
« Last post by azrael on July 22, 2024, 09:52:23 PM »
If I change 10 codes in Block's Entity List, the Text included in Block does not move, so should I move the Text individually?
33
AutoLISP (Vanilla / Visual) / Re: Help:Boundary by pick multi areas
« Last post by Zeftax on July 22, 2024, 05:25:04 PM »
The software itself may not be evil by itself, but the way people use it certainly is. Try using google, or any of the web pages it spews out nowadays. It will most likely be AI-generated infinite scroll SEO nonsense that brings no value into this world and just wastes computing resources and human reading time.
34
CAD General / Re: Script File for Operations in Multiple DXF Files
« Last post by Lonnie on July 22, 2024, 05:16:13 PM »
Sorry
Bringing up that other thread was probably a mistake.
It looks like your using drive letters so you can simply browse to your folder. No reason at all to edit the cfg file.

That script assumes you can run the lisp in each newly opened file.
Can you type foo in a newly opened file and have it run?

In addition, does the lisp run the way you expect?  Does it do the purge and the save to dxf like you expect? If so it should work.

If the lsp file is not loading in each new file try this.
copy this

Code: [Select]
(defun lm:prg ()
(if (= 1 (getvar 'dwgtitled))
    (progn
        (setq doc (vla-get-activedocument (vlax-get-acad-object)))
        (repeat 3 (vla-purgeall doc))
    )
)
)

(defun lm:SaveAsDXF ()
  (setq original-filedia (getvar 'filedia))  ; Save the current filedia setting
  (setvar 'filedia 0)                        ; Set filedia to 0 to suppress dialog boxes
  (setq current-filename (getvar 'dwgname))  ; Get the current drawing name
  (setq dxf-filename (strcat (vl-filename-base current-filename) ".dxf")) ; Create the DXF filename based on the current drawing name
  (command "_.SAVE" "DXF" "16" dxf-filename) ; Save the file as a DXF
  (setvar 'filedia original-filedia)         ; Restore the original filedia setting
  (princ (strcat "File saved as DXF: " dxf-filename "\n")) ; Print a message to the command line
)

(lm:prg)
(lm:SaveAsDXF)


lisp to
"C:\Users\CEH\Desktop\Publish Issues"

Name it to purgesave.lsp
Type
(load "C:\\Users\\CEH\\Desktop\\Publish Issues\\purgesave.lsp") at a command prompt.
tell autocad to always load this file.

Change the script to the following

_.open *file* (load "C:\\Users\\CEH\\Desktop\\Publish Issues\\purgesave.lsp") _.close


Once again nothing was really tested.

1. The new lisp will run on the load command so there is no need to add it to your autocad.
and
2. make sure the lsp does what you want. I really did not test it well.



35
AutoLISP (Vanilla / Visual) / Re: Help:Boundary by pick multi areas
« Last post by brob on July 22, 2024, 05:02:11 PM »
I didn't say anything about C!
I told you how to fix this already!  Did you even read my post?

And BTW, Good or Evil DOES NOT EXIST in software, it is always up to what humans do with the code and it's capabilities...

While I agree that a lot if humans who don't know the difference between good and evil write software, unfortunately all we can do is stay vigilant. 
I have been dealing with that issue for a very long time.
Currently, Chat GP???? is not very good at producing runnable code. 
It's like having to break in a first year overly-eager intern who doesn't have a clue. 
Be patient and ready to issue revision after revision, and watch out for unwanted changes as it
regenerates those unusable versions.
Still, it does have the ability to generate something quickly that may seed your epiphany on how it
should really be done....At that point, break off and write it yourself!!!
36
CAD General / Re: Script File for Operations in Multiple DXF Files
« Last post by CEHill on July 22, 2024, 04:47:13 PM »
The ROAMABLEROOTPREFIX displays at the command line when Script Writer is invoked.
"C:\\Users\\CEH\\AppData\\Roaming\\Bricsys\\BricsCAD\\V24x64\\en_US\\"

UNC PATH: What path is needed by the program to actually process the DXF files?

My LMAC_WScript_V1.2.cfg file contains the following code: where the folder of DXF files reside.

Code - Auto/Visual Lisp: [Select]
  1. "_.open *file* (c:foo)  _.close"
  2. "C:\\Users\\CEH\\Desktop\\Publish Issues\\Test 1 Copy 24-11825_ Framing Shop (SE Detailed... HW-1 Only Print)"
  3. "0"
  4. nil

I am not sure what I am missing. IT HAS TO BE SIMPLE!
37
CAD General / Re: Script File for Operations in Multiple DXF Files
« Last post by CEHill on July 22, 2024, 04:28:48 PM »
The UNC path to the folder where the files to be processed reside. Correct? I apologize for the lengthy discourse.

An earlier email reply from Lee Mac containing related questions included several questions from him that implied I simply specify the aforementioned folder. Also, the script will be a single-line code due to the data field.

I will test using the LISP you included.
It will be interesting.
 :whistling:

Thanks a million for your help today, sir!
38
CAD General / Re: Script File for Operations in Multiple DXF Files
« Last post by Lonnie on July 22, 2024, 04:06:49 PM »
You should be able to add

_.open *file* (c:foo)  _.close

through the dialog box and save the script that way. I only mentioned the ROAMABLEROOTPREFIX in case you needed to nuke your stuff.
LMAC_WScript_V1.2.cfg is where all that info is kept.

type
(getvar 'ROAMABLEROOTPREFIX)
and you'll see where it puts it. just remove the extra "\"s
39
CAD General / Re: Script File for Operations in Multiple DXF Files
« Last post by CEHill on July 22, 2024, 03:57:46 PM »
I see. I am going to install a fresh copy of Script Writer and adjust the specified support file you mention.

Thanks,
C.
40
CAD General / Re: Script File for Operations in Multiple DXF Files
« Last post by Lonnie on July 22, 2024, 03:54:14 PM »
On a side note.
"https://www.theswamp.org/index.php?topic=59553.msg620876#msg620876"
showed me where Lee puts his config files in case you really messup. I was able to go into the LMAC_WScript_V1.2.cfg file and type my pathing in to use UNC pathing. It was a real help to me.
Pages: 1 2 3 [4] 5 6 ... 10