Jump to content

Block Info export, inc Insertion Point & Rotation


richardb

Recommended Posts

Hi All

 

Does anyone know of a function or even a LSP file that can export block information, including the insertion point (relevant to the block rather than specific to the drawing) and the rotation of the block.

 

I have a utility to overlay newer blocks over existing older blocks, but need to build a conversion sheet to overlay the new block correctly.

 

Help would be hugely appreciated, thanks :)

Link to comment
Share on other sites

If you pick a block you can easily get at a lot of information like below. You would use these via VLisp or Assoc X if using dxf codes. Just look for any lisp examples that use entsel.

 

; InsertionPoint = (7303.2 2533.46 0.0)

; InsUnits (RO) = "Feet"

; InsUnitsFactor (RO) = 0.3048

; IsDynamicBlock (RO) = 0

; Layer = "0"

; Linetype = "ByLayer"

; LinetypeScale = 1.0

; Lineweight = -1

; Material = "ByLayer"

; Name = "AeccTickCircle"

; Rotation = 0.0

A real simple example just copy the two lines 1 at a time to the command line.

(setq obj (vlax-ename->vla-object (car (entsel "pick block"))))
(alert (strcat "objects name is " (vla-get-name obj)))

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