Jump to content

Inserted block begin at end of a pline instead of the beginning


jremiro

Recommended Posts

I have a lisp routine that we have used for several years. The routine takes a pline, offsets it on either side based on user defined spacing then inserts a premade block to symbolize a road. The block is spaced according to user defined spacing. For instance, a block can be inserted at 2 times the width of the "road" as many times as needed to symbolize the entire length of the offset pline. Hopefully this makes sense! This lisp routine works great on it's own. However, once inserted into a macro, it starts the block insertion at the end of the pline, only inserting one block. This is happening in all versions of AutoCAD we are using from 2004 through 2011. Is there a setvar that should be reset or cleared within the lisp routine? Any suggestions would be appreciated. Thanks!

Link to comment
Share on other sites

This is an AutoLisp routine that was written several years ago that has survived several versions of AutoCAD. The routine, along with specific user input including a block name, has been put into a drop down menugroup. When selecting from the menugroup, I have this problem (the block inserting at the end of the line). When I launch this lisp routine from the command line, it inserts the first block at the beginning of the pline and additional copies of the block along the line spaced according to user input. This morning I discovered this only happens if I run the routine from the command line first. If I select from the pulldown menu first, it will default in both instances to the end of the pline. I don't get any error messages. Thanks again.

Link to comment
Share on other sites

Thanks for the reply. Although I'm fairly weak in LISP code, I think all variables are local. I've yet to come up with a solution so will continue to appreciate all replies. Thanks again.

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