Jump to content

Modify helix in block

Recommended Posts


I am trying to develop a lisp routine to modify the number of turns, turn height, and twist of a helix in a block.

I am sweeping a profile along that helix and by modifying these parameters I can change the resulting surface that represents a curved beam.


I have attached the drawing, but i have not been able to get anywhere with the coding because I have not been able to find out how to isolate those parameters of the helix.


Share this post

Link to post
Share on other sites

So digging through dozens of references I have eventually found a way to modify a helix embedded in a block.

I am using the endpoint later.


    (if (setq ent (car (nentsel "\nSelect Helix in Block : ")))
        (if (= (cdr (assoc 0 (setq get (entget ent)))) "HELIX")
                (setq vlent (vlax-ename->vla-object ent))
                (vlax-put-property vlent  "Turns" 0.25)        
                (vlax-put-property vlent  "Height" 100)            
                (setq EndPoint (vlax-curve-getEndPoint vlent))
                (setq x2 (rtos (car EndPoint)))
                (setq y2 (rtos (cadr EndPoint)))
                (setq z2 (rtos (caddr EndPoint)))
                (setq coord2 (strcat x2 ", " y2 ", " z2))
            (alert "Not a Helix")


Unfortunately this modifies all of the blocks with the same name as the block that has been selected and modified.


Is there any way to link the "Turns" and "Height" properties of a helix in a block, to dynamic attributes or custom properties.


Thanks in advance

Share this post

Link to post
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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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