Jump to content

Recommended Posts

Posted

I thought so as well at first. But doing a test resulted in an unfound file. I think the VLX compilation changes the call to open into a resource read operation.

 

Anyhow, the VLX becomes quite large though, since the DXF is simply copied into it - no compression or such :unsure:. Unfortunately there's not built-in binary read, so no way of simply including the much smaller DWG file, never mind something like a ZLib compressed resource. One could of course uuencode it, but then you'd need a uudecode.exe bundled with the VLX - not what the OP wanted from what I can understand.

 

If you want it as small/fast as possible, then try one of those "convert to lisp" routines. Just remember that you mileage may vary, especially with stuff like dynamic blocks.

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • anishtain4

    10

  • pBe

    5

  • Lee Mac

    2

  • Tharwat

    2

Posted (edited)

Thank guys but actually I gave up on embedding block in the project in post #16, I was only looking for vla-insertblock, there is just one last point:

 

I don't import a block from another drawing hence i guess copyblock would not help me, when I'm using (command "._insert" address *cancel*) the block will be loaded from the file once into the drawing, next time I can insert it with (vla-insertblock) from within the current document. is there anyway to just load the block with (vla-insertblock)? I tried to pass the nil as insert point and it loaded the block but the rest of commands will not be followed and routine stops right after that

Edited by anishtain4
  • 2 weeks later...
Posted
is there anyway to just load the block with (vla-insertblock)? I tried to pass the nil as insert point and it loaded the block but the rest of commands will not be followed and routine stops right after that

 

You cannot omit the necessary parameters from the InsertBlock method, else this method will error (as you have experienced), instead, consider:

 

(vla-delete (vla-insertblock <Container Block> (vlax-3D-point '(0.0 0.0)) <Block Name> 1.0 1.0 1.0 0.0))

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