Jump to content

Leaderboard

  1. aridzv

    aridzv

    Community Member


    • Points

      4

    • Posts

      331


  2. Lee Mac

    Lee Mac

    Trusted Member


    • Points

      3

    • Posts

      21,014


  3. Steven P

    Steven P

    Trusted Member


    • Points

      2

    • Posts

      2,826


  4. ronjonp

    ronjonp

    Trusted Member


    • Points

      2

    • Posts

      2,524


Popular Content

Showing content with the highest reputation on 03/26/2025 in Posts

  1. I really miss that guy. ;/ He was such a witty kind person and one of the most talented lisp programmers I knew.
    2 points
  2. This function was originally written by the late great Michael Puckett - https://www.theswamp.org/index.php?topic=38072.0
    2 points
  3. Of course it happens in the lisp, that's the idea. see at the start of the code (setq osnp (getvar "OSMODE")) (setvar "OSMODE" 0) and at the end of the code restore the OSNAP mode: (command "._PSPACE") (SETVAR "OSMODE" osnp) (princ) Try selecting the block with the cursor trying to snap at every entity around...
    1 point
  4. try the last code and finish the command with ENTER, not escape or right click. only ENTER.
    1 point
  5. you select an empty space
    1 point
  6. I hate spending time correcting AI-generated code, but the first thing that sticks out is that the following: (setq attArray (vla-getattributes vlaBlock)) Will return a safearray variant, which cannot be iterated directly using foreach. Instead, you can use: (setq attArray (vlax-invoke vlaBlock 'getattributes)) Which will return the data using native data types, i.e. a list. You can find more examples here.
    1 point
  7. 'Hatch' isn't defined in the block definition, but the hatch references the block it is contained in (I think) - the opposite to what you'd expect.
    1 point
  8. A couple of ways to do this: Create the block without the hatch, bedit it and in the block editor add the hatch. Use entmakex to create the block so that you have the block entity name to go into. This is slow though, opens up the block editor on the screen so also gives screen changes. This uses pure entmake. A more efficient way is to use vla-addhatch - it is all online with the key to this method being you need to add (vla-evaluate MyHatch) at the end of the hatch definition (where MyHatch is your hatch definition). It doesn't use entmake as such but things like the outlines, hole, hatch patterns etc. can all be done with entmake. This method doesn't open the block editor and is a lot quicker. -EDIT- Link wasn't a goo example
    1 point
  9. use the last code I shared - it deals with the error issue. if it dosn't work - stroke out all the error refrences in the code. I didn't had any issues but if you think the error hadling give you problems than take it out.... edit: in the error trap change (command "._PSPACE") to (SETVAR "TILEMODE" 0) it is not a command so mybe this will solve the issue.
    1 point
×
×
  • Create New...