Could you not just have the macro execute AutoCAD's "dxfout" command and get the dxf file you desire?
Or are you creating it from some other source than AutoCAD? Of course the dxf format will depend if it's an "lwpolyline" or "heavy" polyline, possibly with varying z values, arcs, smoothing...
The command "revcloud" is a standard AutoCAD command (as of 2007?); it used to be a "Bonus" then later "Express" Tool.
You can find the Express Tools lisps at C:\Program Files\Autodesk\AutoCAD 20xx\Express
A quick search found this lisp...
It seems you don't have the routine actually looking if the "filename" exists, you just assign it a string/name, so it would never be 'nil'
Maybe changing one line to the following will do it;
(if (not (findfile filename))
From that last message, sounds like you ran "upd" while in MS, but the block is in PS? Any difference if you run it from PS?
I really need to sse the setup, I'd be gals to look at if you email me an example drawing to address I posted above.
OK I saw the second link...
1. Seeing it is a block with attributes it should have worked if you edited the code for block name
(0 . "INSERT") (cons 2 "Vac Title Block_Original")
2. In the editor dialogue box at the link, no "value" is shown for he "date" tag, is that correct? With my test the...
Hmmm, don't know offhand,as it worked for a simple test block, single attribute with a "date" field.
Looks like the block is getting selected but the field is not found/updated. Are you sure the date field is really an attribute versus some stand alone mtext field? If this is the case, the code...
Try the following lisp routine..once we get it working it could be placed in acad.lsp file & modified to run upon opening a drawing.
(defun c:upd ()
(setq tb_set (ssget "_X" (list '(0 . "INSERT") (cons 2 "Title_block_name_here"))))
(if tb_set
(command "._UPDATEFIELD" (ssname 0 tb_set)...
If the date needs to be updated just when you open the drawing, I believe that can be handled with come code in acad.lsp or acaddoc.lsp file, rather than using the reactor method. A reactor is code that is executed upon some event, such as when a certain command is issued, the reactor code...
Since you're using a field then you'd use a somewhat different approach.
According to help, "Note-The Date field is updated by UPDATEFIELD, but it is not updated automatically based on the setting of the FIELDEVAL system variable."
How/when would you want this field/date updated? Is this for...
I don't know VBA, but...
If you have object ID, can't you un-delete (restore) it, then retrieve info, then re-delete it?
In lisp, (entdel Entityname) will restore an objected delted during the editing session.
I believe the "*BH-*" will affect all layer names that include the "BH-" anywhere within it, so including the xref layers.
Learn lisp just like you are doing-
-review other code
-experiment writing your own
-visit & ask questions at forums-cadtutor, theswamp.org, Autodesk,
www.afralisp.com is...
And one other option, a modification of issuing the layer command. Instead of:
(foreach x LayList
(setq LayName (strcat x))
(command "layer" "off" LayName "" "")
);
keep the layer command active with:
(command "layer")
(foreach x LayList
(command "off" x)
);
(command "" "")
That doesn't seem like very many layers, I would have thought that would take a few seconds. Maybe the drawing is regenerating after each command, you could turn off regens as part of the routine.
two syntax comments;
-shouldn't have a semicolon after layer name "*|B-150U50-54";
and
the 2...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.