Jump to content

Modify helix in block


AChartier627

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.

SS BEND.dwg

Link to comment
Share on other sites

  • 2 weeks later...

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")
            (progn
                (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))
            );progn
            (alert "Not a Helix")
        );if    
    );if

 

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

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