Jump to content

lisp needed


DEEPAKRAJ

Recommended Posts

Lads,

 

First of all a pleasant and happy day for every one,

i need a lisp which can check for standard blocks used in the drawings.

 

for example.

 

if i have drawing of standard block. and i am working in a drawing. i need to check whether i have used the blocks are standard.

Link to comment
Share on other sites

  • Replies 38
  • Created
  • Last Reply

Top Posters In This Topic

  • DEEPAKRAJ

    15

  • Tharwat

    11

  • BIGAL

    4

  • ReMark

    2

Top Posters In This Topic

Posted Images

Dear Remark,

 

i need to check whether i have used standard block name.

for example if the standard block name is 12345.

i need to check whether i have used the same block 12345.

 

because i am using more than 100 blocks. i need to cross check the name of blocks.

 

thanks in advance

Link to comment
Share on other sites

This sounds familiar. I think there might be a lisp routine here that does something like that but I cannot recall which one it might be at the moment. Have you checked the Lisp forum?

Link to comment
Share on other sites

what format does that need to be in?

as in, do you need to see a list of all the block names, or do you suggest a block name and autocad tells you if it is already in the drawing?

Link to comment
Share on other sites

dear designer,

 

there is cad standard check where we insert .dws for checking layers,linetypes,text style,dimstyle etc.

but there is no cad standard checker for blocks.

i need some what like this lisp for check standard blocks.

 

thanks in advance.

Link to comment
Share on other sites

I think you need to spend more time defining your question.

 

Are you checking whether a block name has been used?

Are you checking that the block in your drawing called 12345 is the same as the block named 12345 stored in your standard library?

Are you looking for something else?

 

I have never used the dws solution but I assume it checks the drawing against a standard list. This is not the same as checking a much more complex item such as a block.

Link to comment
Share on other sites

I have moved this request to the Autolisp section.

It is important to post in the correct area of the forum so the right people will see your question.

Link to comment
Share on other sites

Is this what you mean ... ?

(defun c:TesT (/ name found lookfor)
 ;;; Tharwat 06. March. 2012 ;;;
 (if (and
       (setq name (getstring t "\n Name of Block :"))
       (setq found (tblsearch "BLOCK" name))
     )
   (if (setq lookfor (ssget "_x" (list '(0 . "INSERT") (cons 2 name))))
     (cond ((eq (sslength lookfor) 1)
            (alert (strcat "You have : < "
                           (itoa (sslength lookfor))
                           " >  Block in this drawing "
                   )
            )
           )
           (t
            (alert (strcat "You have : < "
                           (itoa (sslength lookfor))
                           " >  Blocks in this drawing "
                   )
            )
           )
     )
     (alert
       (strcat
         " block name : < "
         name
         " > is found is Block Table but not inserted into this drawing yet "
       )
     )
   )
   (cond ((eq name "")
          (princ)
         )
         (t
          (alert " Block is not existed into this drawing ")
         )
   )
 )
 (princ)
)

Link to comment
Share on other sites

I interpreted the request like Tharwath as a block that actually has been used.

 

Also a quick and dirty PURGE and look at the block list if its there its not used.

 

Just a second thought why not just search for all blocks and and no of times in drawing and display then not in drawing

Edited by BIGAL
2nd thought
Link to comment
Share on other sites

Dear tharwat,

 

your near by my question. but here we should mention name of the block.

but my question is . i have standard block drawing. i am working on another drawing where i am using the standard block. after finishing my work .. i want check whether i have used the blocks from standard block drawing, or i created my own blocks.

i need to be down in single shot.

 

i thought of attaching the sample but couldn't attach.

 

regards

Link to comment
Share on other sites

Dear tharwat,

 

your near by my question. but here we should mention name of the block.

but my question is . i have standard block drawing. i am working on another drawing where i am using the standard block. after finishing my work .. i want check whether i have used the blocks from standard block drawing, or i created my own blocks.

i need to be down in single shot.

 

i thought of attaching the sample but couldn't attach.

 

regards

Untitled.jpg

Link to comment
Share on other sites

 

i have standard block drawing. i am working on another drawing where i am using the standard block. after finishing my work .. i want check whether i have used the blocks from standard block drawing, or i created my own blocks.

 

I think you should post names of your standard blocks to allow anyone that want to write a routine for you to include them within their routine for all Blocks checks .

Link to comment
Share on other sites

Dear tharwat,

 

i have lots of blocks my dear.

 

So how would the routine know that one of the selected block is belong to your standard blocks or not ? :shock:

Link to comment
Share on other sites

Dear tharwat

 

there is standard checker in autocad. where we give command check. and add the standard.dws file which we have created for standards. which will cross check with standards in dws with my working file. like layers,line types,dimension style,text style,etc. but in this process the standard blocks are not checked.

i need to check even the blocks name before sending the files.where there might be more than 100 blocks.

your lisp was very useful but each time i should give the names of the block which will take more time. i was using previously using filter command to find the blocks. for seeing names i used a lisp. but there i get only the names if i am finding one by one it takes a lot time.

:( :( :( :( :(

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