Jump to content

Prewritten Lisps and Acad Commands Combined for .dxf Import


KraZeyMike

Recommended Posts

Almost every drawing I work on is exported from another Survey program and then Imported into Civil3D as a DXF
I have sped up this process with a Lisp command and built in AutoCAD functions but would really like to combine the whole process into one Command.
I am not sure if I can modify and combine existing lisps to achieve this or using a Script which I have had no experience with as yet.

Below I have outlined the steps, attached the Lisp used and a video (two parts due to size limit) outlining the process that for every job is becoming tiresome.

 

  1.  Redefine the inserted Block
    For some reason when I insert the DXF it does not automatically redefine (Which is needed to update Survey blocks to my custom Acad Blocks. So I have to re-insert the DXF to force redefine
  2. "DP" Lisp (Attached) - This routine deletes the crosses that are carried over from our Survey Software and are not required.
  3. Explode and set "By Layer" Color, Linetype and Lineweight
  4. Attsync two blocks - POINT_CROSS and $FILL
  5. Finally I would like to select the Attsync selection (POINT_CROSS and $FILL) and set their scale back to 1
    Seems to be that these blocks which I have redefined to be annotative, 
    scale according to the model space when inserted which we don't leave on 1:1 but our most commonly used scales for each template.

 

As always the expertise and help provided here is greatly appreciated.

DP (Delete Points).lsp

Link to comment
Share on other sites

Thanks BIGAL, I got it to work but it's not really what I am after.
My main gripe is having to re-insert all the time to redefine the POINT_CROSS blocks with my own inside the drawing, then of course having to attsync and set the scales back to one etc. Basically the process in the video above. Most of the other items I have separate lisp routines for depending on if they are required or not. 

I forgot to add a third Magnet block that I always have to redefine is POINT_SCIRCLE which we use for invert levels (Again redefined to my own block).
I'm still not sure why I have to re-insert for a Magnet DXF to redefine to my custom blocks, inserting from the design centre always prompts to redefine first go. 

 

Ps. Also from AU, NSW.
My Brother-in-law is working on the Hexham Straight upgrade :)

Link to comment
Share on other sites

Posted (edited)

From my limited (very limited) knowledge of lisp routines.
I'm thinking the solution would be to insert as per normal and then begin the lisp with either a reinsert previous (to prompt the redefine) or a redefine function prompting me to select the dxf block.
This would ideally flow onto the DP lisp attached to remove the pd mode crosses and then an explode command.

 

After that maybe a Sel1 or Setq 1st for the blocks "POINT_CROSS,$FILL,POINT_SCRICLE" and run the attsync function; followed by the same selection set and set Scale X of the blocks to 1.

Finally it would finish with a Ctrl All to set Color, Linetype and Lineweight to By Layer.

 

I can seem to find pieces of all these functions but can't put it all together 
 

Edited by KraZeyMike
Link to comment
Share on other sites

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...