![]() When you start a new drawing with the New command on the Application menu, you can choose which template you want to use. Bring in ONE of the three blocks that we are using to create the. This will bring up the Block Insertion panel. Once we are in the Block Editor screen of Civil 3D, on the command line type in INSERT. AutoCAD Civil 3D (Imperial) NCS AutoCAD Civil 3D (Metric) NCS These templates contain an extended set of styles and settings. Step 3: Now that the empty block has been created, we will add existing blocks (Type1, Type2, SSMH) to the structures block we created above. I've modified code written by user pbejse on the Autodesk Forum. The two AutoCAD Civil 3D drawing templates are based on the United States National CAD Standard. ![]() I added a function to search through all the blocks in a dwg and to change the layer of any non standard layers but I cannot get it to check blocks that are not inserted into Model Space. Okay I'm back and nearly everything is working. (setq ent (entget (ssname ss (setq i (1- i)))) (setq ss (ssget "_X" (list (cons 8 oldLayer)))) (vla-put-name (vla-item layers oldLayer) newLayer) (vla-get-activedocument (vlax-get-acad-object)) (defun unitLayer (/ layers newLayer ss i ent) (if (and fname (setq fname (findfile fname))) (not (wcmatch (strcase msg) "*CANCEL*,*BREAK*,*EXIT*")) (defun c:Test (/ *error* echo dc fn fname prg) |-END-DRAWING SPECIFIC RENAMING FUNCTIONS-| (foreach oldLayer '("ANSI" "_ANSI" "F.H." "1_F.H.") (renameLayer oldLayer newLayer)) (defun c:unitLayer ( / newLayer ) This function runs perfectly when run from the command line but crashes when run from dialog box. Its advantage over U is that you can use it after using BLOCK. OOPS Restores the most recently deleted items. |-BEGIN-DRAWING SPECIFIC RENAMING FUNCTIONS-| Repeats the next command until you cancel (Esc) MVSETUP Sets up the layout of a drawing. (prompt (strcat "\nLayer " oldLayer " not found. ![]() (setq ent (entget (ssname ss (setq i (1 i))))Įnt (subst (cons 8 newLayer) (cons 8 (cdr (assoc 8 ent))) ent) (setq ss (ssget "x" (list (cons 8 oldLayer)))) ((and (tblsearch "layer" oldLayer)(tblsearch "layer" newLayer)) (command "._rename" "la" oldLayer newLayer) (cond ((and (tblsearch "layer" oldLayer) (not (tblsearch "layer" newLayer))) (defun c:renameLayer ( oldLayer newLayer / ss i ent ) Label = \"Automated Layer Renaming - V06-08-15\" (setq fname (vl-filename-mktemp "dcl.dcl")) It works fine when using the testFunction. (action_tile This action tile causes a crash when using the UnitLayer function. (if (not (new_dialog "layerRenamer" dcl_id)) (defun C:layerRenamer (/ dcl_id fn fname) If any can take a look at it and give some suggestions I'd be very grateful. REVERT Closes and re-opens the current drawing. I've simplified the code down for brevity. REDIRMODE Sets options for the REDIR command by specifying which object types the command should act on. I think it's getting stuck in a loop because the VLIDE gets stuck until I close the AutoCAD drawing and open a new one. Unhandled Exception E06D7363 (e06d7363h) at address FDACB3DDh
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |