Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Change Surface Style

ebsoares
Collaborator

Change Surface Style

ebsoares
Collaborator
Collaborator

Hi, all.

 

Is there a way to change the surface style through the command line alone? Assume we have two surface styles called "my-contours" and "my-triangles", can we have a lisp routine that would call them and bypass any dialog boxes?

 

Thanks for any input.

 

Edgar

0 Likes
Reply
676 Views
4 Replies
Replies (4)

hmsilva
Mentor
Mentor

@ebsoares wrote:

Hi, all.

 

Is there a way to change the surface style through the command line alone? Assume we have two surface styles called "my-contours" and "my-triangles", can we have a lisp routine that would call them and bypass any dialog boxes?

 

Thanks for any input.

 

Edgar


Hi Edgar,

I'm not a C3D guy, but based on this post by @rkmcswain the surface object have a 'SurfaceStyle' property, perhaps anything like this will do the trick...

 

(vl-load-com)
(defun c:demo (/ sel)
   (if (and (setq sel (entsel))
            (eq (cdr (assoc 0 (entget (car sel)))) "AECC_TIN_SURFACE")
       )
      (vlax-put-property (vlax-ename->vla-object (car sel)) "SurfaceStyle" "my-contours")
   )
   (princ)
)

 

EDIT: probably a regen is required...

 

Hope this helps,
Henrique

EESignature

0 Likes

ebsoares
Collaborator
Collaborator

Hi, Henrique. Thanks for your post!

 

I've tried the lisp on my end and it doesn't work, however. It goes as far as asking to select a surface (even if one is already selected) and ends the routine, without any changes...

 

Thanks again,

 

Edgar

0 Likes

hmsilva
Mentor
Mentor

Hi Edgar,

as I had previously said, I'm not a C3D guy, and unfortunately, I can not provide much help on this... 😞

 

Henrique

EESignature

0 Likes

ebsoares
Collaborator
Collaborator

Got it, Henrique 🙂

 

Hopefully someone will come along and help out.

 

Thanks again!

 

Edgar

0 Likes