Jump to content

How do I set the dimension style on AutoLisp?


brianhiroshi

Recommended Posts

Well, as a matter of fact there is one thing I was trying to do but didn't manage to. After making the drawing and placing the dimensions, I tried to scale the whole thing, but I don't know how to pick the entities without having to use pickpoints (which was not very effective to select the dimensions) or window/crossing (which can end up selecting other entities that were not supposed to be selected). Later, I will have to rotate the drawing too, then I will come to the same problem with selecting the drawing. Would you have any idea of how to do it?

Thanks!

Link to comment
Share on other sites

  • Replies 27
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    11

  • brianhiroshi

    11

  • Se7en

    4

  • alanjt

    2

Sorry, my english is not very good. Basically yes, there may be a chance that the user of the routine will use it to draw over another drawing, then we would have lines drawn by the program and others by the user mixed. I wanted to scale only the lines and dimensions made by the lisp.

Thanks

Link to comment
Share on other sites

If you are having line and entities drawn by a LISP, then the way I would proceed is to make the LISP create a global variable containing a list of entity names of all the entities created by the LISP.

 

That way you could refer back to them at a later date.

 

But, of course, this would only work for during the drawing session.

 

The only other way I would think of would be to either create the LISP lines with their own colour or layer.

Link to comment
Share on other sites

Yes, that's what I did. It was something like that...

 

(command "._line" pt1 pt2 "")

(setq e1 (entget (entlast)))

.

.

.

(setq entities (list e1 e2 e3 ...))

(command "._scale" entities "" pt1 scalenumber "")

 

I've tried variations of this but neither of them worked. I don't know what I might be doing that it's not working.

 

Thanks

Link to comment
Share on other sites

Scale requires a selection set, not a list of entities - I just suggested a list of entities, as I thought it may be easier to keep track of things.

 

But use this:

 

(setq ss (ssadd))
(command "._line" pt1 pt2 "")
(ssadd (entlast) ss)
.
.
.

(command "._scale" ss "" pt1 scalenumber "")

Link to comment
Share on other sites

It worked perfectley, thank you very much Lee Mac, I've been working in this the whole week, sorry for all the trouble.

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