Jump to content

Change surface style with command


Recommended Posts

Posted

Hi,

 

When i want to switch a surface style (lets say from triangles to points) i have to rightclick the surface in the toolspace or edit it in the properties window when i select the surface in my drawing.

 

And there are probably some other ways to, but i want to 'lisp' it.

 

Is there a way to change it on the command bar? My level of lisp writing is very basic, so unless i can do it on the command bar i can't make it.

 

Any tips?

 

FYI; i got surface styles naming like AAA-TRIANGLES and - AAA-POINTS.

Posted

popups and selecting things allready seem like a drag... i basicly just want to click on a surface (having it selected/active) and typ in a command, press enter and the style changes..

 

i.e. When i select a surface and just type in 'triangles' and it goes to a predifined state.

 

Maybe the linked program can be used on the command bar? Writing a lisp on that?

Posted

I think the reason for the dialog is in case the surface you want to change is not select-able.

 

Here is some quick, rough code for using a selection instead of picking from a dialog.

 

 (setq se (entsel))
 (setq el (entget (car se)))
 (setq et (cdr (assoc 0 el)))
 (if (eq et "AECC_TIN_SURFACE")
   (progn
     (setq obj (vlax-ename->vla-object (car se)))      
     (vlax-put-property obj "SurfaceStyle" ***styleobject***)
     (more stuff here....)
   )
  )

Posted

The code in the link by me uses a toolbar for its pick it has the majority of styles preset that we would normally use and includes a turn off surface style it also handles multiple surfaces turned on at same time. Have a look at the ZIP file it has the toolbar in it. It turns on surfaces even if not currently displayed.

 

I think its as close as you could want. Any questions just post

 

There is also a pt style version available.

 

Thanks rkmcswain

Posted

 

Thanks rkmcswain

 

Thanks to you for posting this code. Very nice.

Posted

Nice job, Al - You might also be interested in using a custom Contextual Ribbon Tab (when RIBBONSTATE == 1 in lieu of the toolbar, etc.), which would make it seem more 'native' to Civil 3D, and also account for surface(s) that are selected and not currently being displayed (right click --> select via Toolspace, etc.).

 

For non-Implied selections, the dialog seems appropriate, regardless of RIBBONSTATE. :thumbsup:

 

... Great topic, in deed. :beer:

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