Author Topic: Getting a list of civil 3d style variables  (Read 3517 times)

0 Members and 1 Guest are viewing this topic.

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Getting a list of civil 3d style variables
« on: March 10, 2011, 07:42:36 PM »
I have some programs that allow shorthand manipulation of contour and points display in CIV 3d these use internal variables suchs as Surfaces & SurfaceStyle, Pointgroups & Pointlabelstyles these can then be manipulated to change the current styles displayed.

One of the little annoyances is that we have a block for all our survey symbols and this matches a point style eg survey code "tree" this is matched to a point with the block "tree" displayed. When you purge the unused blocks are not removed as they are identified as being used because they are attached to a point style. You can manually remove the point styles then you can purge the blocks.

A normal ssget of the blocks will return those used I need to get the variable name of the point style so I can then compare two lists blocks used v's codes used and delete the styles not being used.


Without pasting all the code here is an example for pointgroups.
Code: [Select]
(vlax-for j (vlax-get *AeccDoc* 'Pointgroups)
(setq lst (cons (cons (vla-get-name j) j) lst))
)

If anyone has a list of the civ3d variables it would be appreciated or knows the answer for point styles. Also code to remove a style.

If this would be of use more than happy to paste code.


   
A man who never made a mistake never made anything

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Getting a list of civil 3d style variables
« Reply #1 on: March 10, 2011, 08:15:01 PM »
I put this together when I first started working in Civil 3D...
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Getting a list of civil 3d style variables
« Reply #2 on: March 10, 2011, 09:06:06 PM »
Thanks the one I was looking for was Pointstyles, I thought I tryed that as a guess. 

Also made a couple of changes to the original code gratefully supplied by AlanJt
Code: [Select]
;vercheck.lsp  version check for aecc objects

(defun ah:vercheck ()
(vl-load-com)

(if ((lambda (vrsn)
        (cond
         ((vl-string-search "R17.2" vrsn) (setq appstr "6.0")) ;09
         ((vl-string-search "R18.0" vrsn) (setq appstr "7.0")) ;10
         ((vl-string-search "R18.1" vrsn) (setq appstr "8.0")) ;11
        ((alert "This version of C3D not supported!"))
        )
       )
       (vlax-product-key)
      )                         ; end if condition progn is true
      (progn
        (cond (*AeccDoc*)
          ((setq *AeccDoc*
            (vlax-get
              (cond (*AeccApp*)
                ((setq *AeccApp*
                  (vla-getinterfaceobject
                     (cond (*Acad*)
                     ((setq *Acad* (vlax-get-acad-object)))
                     )
                     (strcat "AeccXUiLand.AeccApplication." appstr)
                  )
                 )
                )
              )
              'ActiveDocument
            )
           )
          )
        ) ; end main cond
      ) ; end progn
) ; end if vsrn
)

and now

Code: [Select]
;; Original code by Alan J. Thompson, 06.22.10
  ;; Modified by Alan H Jan 2011

(vl-load-com)

(ah:vercheck)
     
(vlax-for j (vlax-get *AeccDoc* 'Pointstyles)
(setq lst (cons (cons (vla-get-name j) j) lst))
)

this way only need to change 1 lisp for newer versions hopefully

A man who never made a mistake never made anything

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Getting a list of civil 3d style variables
« Reply #3 on: March 10, 2011, 09:11:51 PM »
I would suggest that purging out the 'unused' blocks that are assigned to point styles is not a good idea.
As what happens when or if you get new survey data with description keys that need those blocks assigned to those previously unused point descriptions?

Answer..you would get no symbol for the new point data.


Just something to consider.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Getting a list of civil 3d style variables
« Reply #4 on: March 10, 2011, 10:28:40 PM »
I would suggest that purging out the 'unused' blocks that are assigned to point styles is not a good idea.
As what happens when or if you get new survey data with description keys that need those blocks assigned to those previously unused point descriptions?

Answer..you would get no symbol for the new point data.


Just something to consider.
x2
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Getting a list of civil 3d style variables
« Reply #5 on: March 10, 2011, 11:33:27 PM »
Already aware of the possible deleting problems.

1 We have fairly good control on the field survey issue our is in house and very experienced, 50yrs+ so extra  or joining survey is not a problem. The survey is always kept seperate form the working drawing and additional survey would be pasted in.

2 Its pretty easy to either aeeccimportstyles before adding or add styles by copying from a template.

Bearing in mind that you would do this cleanup once you have prelim completed and as a part of the final drawing clean up.  Its all part of speeding up the drawing we have a couple of problem people who like to add junk and make my life hell sorting it out.
A man who never made a mistake never made anything