Jump to content

Recommended Posts

Posted

I am using AutoCAD at new new job and finding out there structural Steel details where explored from Revit!

Insert detail block into a drawing at 1/8”=1’0” and try modifying the detail the dimension change. The dimstyles, Textstyle and layers in the details are wrong.

After realizing every detail in our library was explored from Revit and never cleaned up.

So now I opened can of worms and it up to me to clean up all 300 details.

What I had to do to clean up details. Details are 1 -1/2” scale

1.         setcurrent dimstyle to Annotative before deleting all others, but EE-STD_DIM_STYLE dimstyle

2.        Purge all layers, dimstyles and textstyles

3.        Select all dimension and set to Dimstyle cloes to the one I need to change to. Sample EE-STD_DIM_STYLE

4.       Inserted block with all layers, dimstyle and textstyle.

5.       Re-select all dimension again, change Dimstyle to correct one from the drawing inserted.

6.       Purge the EE-STD_DIM_STYLE Dimstyle and save

7.       Purge base drawing of that detail, re-insert and it is fine.

 

I am look for lisp or script file to help with cleanup.

I know just little bit of lisp, know how to create script file!

Can any one help?

before I click on it to edit the block in the drawing.PNG

after I click on it to edit the block in the drawing.PNG

After I clean up and purge detail.PNG

Posted (edited)

So google might be your friend here, depending how much you can do with a LISP, I would find all the parts in the process and then make up another LISP that runs through each in turn.

 

Something like this: (command ClearDrawing)

 

(DEFUN C:ClearDrawing ( / )
  (SetDimstyle "Annotative") ;;Calls SetDimstyle LISP routine
  (custompurge) ;;purges set details
;;...and build up your routine like this with building blocks
  (princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-set-a-dimstyle-current-from-lisp-without-command/td-p/808494
;;Don't forget to reference where you got the routines from incase yuo need to reference them later
;;Sets current dimstyle to 'dstyle'
(defun SetDimstyle(dstyle / activedoc)
;load ActiveX services
  (vl-load-com)
;Set the active document object to a variable
  (setq activedoc(vlax-get-property(vlax-get-acad-object)'activedocument))
;if the stylename exists in the drawing:
  (if (tblsearch "dimstyle" dstyle)
  (progn
    (vlax-put-property activedoc 'ActiveDimStyle (vla-item(vla-get-dimstyles activedoc)dstyle))
    (princ(strcat dstyle " is now the Active Dimstyle!")))
    (alert(strcat dstyle " is not a defined dimstyle!")))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun custompurge ( / )
  (command "-purge" "LA" "" "n") ;;layers
  (command "-purge" "D" "" "n") ;;DimStyles
  (command "-purge" "ST" "" "n") ;;texttyles
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 

 

See how you go with finding LISPs that do the parts you want, see what you can make up and of course we can help you out where you get stuck.

 

One question that will be asked shortly is to upload and share here a sample drawing, that would help with testing the help you are going to be given

Edited by Steven P
Posted

Thanks, but it really didn't help much.

layers worked in the lisp routine,

dimstyle only removed the Annnotative from the list

textstyle did nothing.

 

Thanks for trying.

what I am thinking is set the "Dimstyle "SET Current" to EE_STD_DIM_STYLE, delete all others, but all dimensions have to be change to "EE_STD_DIM_STYLE" before this cleanup.

insert DETAIL SHEET.dwg with layers, styles and dimstyle.

 

Detail.dwg 

added few details with wrong dimstyles that Revit created.


 

DETAIL SHEET.dwg BPL5-E-1B.dwg BPL6-CIP-1B.dwg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...