Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Surface Style

4 REPLIES 4
Reply
Message 1 of 5
ebsoares
611 Views, 4 Replies

Change Surface Style

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

Tags (3)
4 REPLIES 4
Message 2 of 5
hmsilva
in reply to: ebsoares


@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

Message 3 of 5
ebsoares
in reply to: hmsilva

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

Message 4 of 5
hmsilva
in reply to: ebsoares

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

Message 5 of 5
ebsoares
in reply to: hmsilva

Got it, Henrique 🙂

 

Hopefully someone will come along and help out.

 

Thanks again!

 

Edgar

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report