Jump to content

Recommended Posts

Posted

what is the possibility of using codes to create a block?

I want to avoid inserting a drawing to use the block in dimstyle.

DimstyleBlocks.dwg

dimstlblk.PNG

Posted

Here is an example of creating entities and then creating the block and the insert.

 

This should help you get an understanding of it.

FrameCall.lsp

Posted

the routine not working

im using CAD2007

Posted
what is the possibility of using codes to create a block?

I want to avoid inserting a drawing to use the block in dimstyle.

 

Try it

(defun C:add_dimblocks ()
(if (not (tblsearch "block" "EC-Arrow"))
(progn
(entmake '((0 . "BLOCK")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(100 . "AcDbBlockReference")
(2 . "EC-Arrow")
(10 0 0 0)
(70 . 0)
)
)
(entmake '((0 . "SOLID")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(100 . "AcDbTrace")
(10 0 0 0)
(11 -15 -3.75 0)
(12 -15 3.75 0)
(13 0 0 0)
(39 . 0)
)
)

(entmake
'((0 . "ENDBLK")
(100 . "AcDbBlockEnd")
(8 . "0")
)
)
)
)

(if (not (tblsearch "block" "EC_TICK"))
(progn
(entmake '((0 . "BLOCK")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(100 . "AcDbBlockReference")
(2 . "EC_TICK")
(10 0 0 0)
(70 . 0)
)
)
(entmake '((0 . "LINE")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(62 . 
(100 . "AcDbLine")
(10 0 -6.25 0)
(11 0 5 0)
)
)
(entmake '((0 . "LINE")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(62 . 
(100 . "AcDbLine")
(10 5 0 0)
(11 -5 0 0)
)
)
(entmake '((0 . "LINE")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(62 . 7)
(100 . "AcDbLine")
(10 -5 -5 0)
(11 5 5 0)
)
)
(entmake '((0 . "ENDBLK")
(100 . "AcDbBlockEnd")
(8 . "0")
)
)
)
)
(princ)
)

 

~'J'~

  • 1 month later...
Posted
Thanks FIXO

You're welcome

Cheers :)

 

~'J'~

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