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

Avoiding meshsmooth dialog

8 REPLIES 8
Reply
Message 1 of 9
amlamlaml
535 Views, 8 Replies

Avoiding meshsmooth dialog

Hi,

 

When using meshsmooth from AutoLisp, is there a way to avoid the dialog that comes up when the object is a non

primitive 3d solid?

 

Best,

António.

8 REPLIES 8
Message 2 of 9
bgingerich
in reply to: amlamlaml

Maybe FACETERPRIMITIVEMODE?

 

(if ("mysolution"=answer) then (click "Accept As Solution"))
------------------------------------------------------------------------------------

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
Message 3 of 9
Rtogores
in reply to: amlamlaml

You can mark the checkbox that appears in the lower left corner of the MESHSMOOTH dialog box with the label "Always convert ..."

The dialog asking if you want to convert the solid will not appear again.

This would have to be done manually the first time,but apparently it will hold for new sessions.

But usually the modeling workflow would begin by modeling mesh objects and when the final shape is attained, converting them to surfaces or solids to profit from the additional edition possibilities or to export them to programs like REVIT.

I have been studying the programming possibilities for MESH objects for some time now.

You can see some of the results achieved in my class at this year's edition of Autodesk University.

http://au.autodesk.com/?nd=au_player#0%0:3202

It shows how MESH objects can be created directly using entmake and how they can be shaped modifying their vertices coordinates using entmod. The handout also includes the code for doing this using ActiveX properties.

I hope this can give you new ideas of how to program meshes using AutoLISP.

Regards,

Message 4 of 9
amlamlaml
in reply to: Rtogores

Thanks a lot for your ideas.  I just watched the videos and they have a lot of useful information.

 

If I understood you correctly, there is no way to avoid forcing the user to mark the checkbox in the meshsmooth dialog.

That's too bad. I was hoping I could do that automatically on user's behalf.

 

On the other hand, you mention in the videos that there are activex functions to manipulate meshes.  Do you have more information about that, namely, how to create a mesh in the first place, using ActiveX exclusively? Do you have a link for that documentation?

 

Thanks in advance,

 

Best regards,

Antonio Leitao

Message 5 of 9
Rtogores
in reply to: amlamlaml

There are no exposed methods to create MESH objects in ActiveX.

You can MODIFY them. I believe I included in the handout a function equivalent to the entmod-mesh one. I`ll check it out.

My intention was to include a video showing this, but AU limited the number of videos to eight, so I had to leave it out.

But I would recommend using our good old AutoLISP as it is much more effective in this case. For example, to modify a MESH with ActiveX its SMOOTHING level should be zero. But as you have seen in my videos SMOOTHING level is no problem with entmod.

Here's the code for ActiveX:

(defun ax-mod-z  (ename equation / obj i pt)
  (vl-load-com)
  (setq obj (vlax-ename->vla-object ename)
        i   0)
  (repeat (vla-get-VertexCount obj)
    (setq
      pt (vlax-safearray->list
           (vlax-variant-value (vla-get-Coordinate obj i))))
    (vla-put-Coordinate
      obj
      i
      (vlax-3d-point
        (list (nth 0 pt)
              (nth 1 pt)
              (apply equation (list (nth 0 pt) (nth 1 pt))))))
    (setq i (1+ i))))

 Remeber you can download all the code from AU2012

Message 6 of 9
amlamlaml
in reply to: Rtogores

Thanks for the code snippet.

 

My problem is that I'm developing a separate application that talks to AutoCAD. Given this scenario, I suppose there is no way for me to use entity operations (entget, entmod, entdel, etc) or any other AutoLisp operations.  Am I mistaken about this?

 

What is the best way to have a separate application talking to AutoCAD?

 

Best regards,

António Leitão.

Message 7 of 9
Rtogores
in reply to: amlamlaml

I don't have experience in that kind of programs, but it is possible.

Look, for example in this discussion thread, a bit old, but from Tony Tanzillo, one of our great gurus:

https://groups.google.com/forum/?fromgroups=#!topic/autodesk.autocad.customization.vba/gNxd77C3WZA

Message 8 of 9
amlamlaml
in reply to: Rtogores

Excellent advice!  Allowing my application to access AutoLisp solved a lot of problems.

 

Thanks a lot.

 

Best regards,

António Leitão.

Message 9 of 9
Rtogores
in reply to: amlamlaml

You're welcome António, glad I could help.

I'm curious of what you are using MESH objects for. As they are relatively new I haven't found much programming done around them.

Best regards,

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

Post to forums  

Autodesk Design & Make Report

”Boost