Author Topic: Re: UCS Help (entmake lwpoly in OCS)  (Read 1407 times)

0 Members and 1 Guest are viewing this topic.

curmudgeon

  • Newt
  • Posts: 194
Re: UCS Help (entmake lwpoly in OCS)
« on: March 05, 2013, 04:14:46 PM »
Lee & gile:

I read through your discussion and I am going to steal your code for my own dubious purposes, with many thanks.
This is the clearest example of TRANS I have ever seen, so I will also study it intensely, and hope to grok it soon.

One quick question. This is the first time I have ever seen entmakex.
So, I edited it back to the entmake command I have always used, and that worked too.

Why & when - entmakex?

Again, thanks.

roy
Never express yourself more clearly than you are able to think.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: UCS Help (entmake lwpoly in OCS)
« Reply #1 on: March 05, 2013, 04:41:58 PM »
Why & when - entmakex?

Put simply, entmakex returns the entity name of the created entity (if successful), whereas entmake returns the supplied DXF data list* (if successful). There are other subtle differences relating to owner entities, but I believe these only arise where Dictionaries are concerned.


*unless when generating an ENDBLK entity, where the block name is returned.

curmudgeon

  • Newt
  • Posts: 194
Re: UCS Help (entmake lwpoly in OCS)
« Reply #2 on: March 05, 2013, 06:42:41 PM »
.... excellent. I have no use for Dictionaries, at this time, so my understanding is essentially complete.
Your routine, I do not need text, so it got shorter. The end result needs to be a rough opening in a wall,
going from 2d to 3d. I extrude walls UP in plan view, but need to create the openings perpendicular to
WCS. Actually, entmakex is going to be handy. I can create a list of enames for the lwpolylines I create,
and pass the list on to the EXTRUDE command.

Which brings up the next thing. All I know to do to make primitive solids is EXTRUDE, and it works.
(command "extrude" ename ......

But can I entmake a solid?
I hate using the command command.

thanks.
Never express yourself more clearly than you are able to think.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: UCS Help (entmake lwpoly in OCS)
« Reply #3 on: March 05, 2013, 06:55:35 PM »
But can I entmake a solid?

Yes, it is possible to entmake[x] a 3D Solid entity, however, it is only really practical to entmake[x] a copy of an existing 3D Solid [using for example (entmakex (entget (car (entsel)))) ] - use this on a 3D Solid to discover why :wink:

A practical alternative to the command call might be to use the Visual LISP ActiveX addextrudedsolid method.

curmudgeon

  • Newt
  • Posts: 194
Re: UCS Help (entmake lwpoly in OCS)
« Reply #4 on: March 07, 2013, 11:20:01 AM »
thanks - I am putting that on my list of things to do - but a job with pay implied came through the door.  :ugly:
WHEN I come back to this, I suspect I will find something similar to what you get when you (entget (car (entsel)))
any 3d solid.

SOME SORT of 3d would be oh, so very handy for architectural elevations. method of choice at the moment is to
extrude walls up, and punch windows in perpendicular to walls. that way an ellipse on the top does not kill me.
shutters and trim will look GOOD at 45 degrees. ETC.

and I guess, since the L in lisp means list, what I should do in this case is create a list of all the lwpolys I extrude
to create the solids I use to punch the holes, and remake new solids (plugs) from that list when the dreaded EDITING
visits me, or maybe even better - erase the original wall and repunch all the holes in at new locations.

JUST BEING ABLE TO PROGRAM TO DEFINE A RELEVANT "ON THE FLY" OCS IS 97.2% OF THIS BATTLE.
thanks.

Never express yourself more clearly than you are able to think.