Open the Civil database
I have a toolbar for setting Tin surface styles on and off contours etc that I wrote for CIV3D.
The attached is the version to open the CIV3D database, I am sure the problem is in this line. (strcat "AeccXUiLand.AeccApplication." C3D) Bricscad probably has a different name for its application.
So if any one has an idea how to get application names or what is the correct application name I would appreciate it.
Comments
-
You could use VLE-LICENSELEVEL.
(vle-member "PROFESSIONAL" (vle-licenselevel))
or LICLFLAGS
(if (not (= 4 (boole 1 (getvar 'LICFLAGS) 4)))(Princ "\nBricsCAD Civil Tools requires BricsCAD Pro or greater"))
To work with TIN surfaces in LISP you would need to load the civil tools using VL-LOAD-CIVIL first. This could also be used as a check.
(if (vl-load-civil) (princ "\nBricsCAD Civil LISP tools loaded")(princ "\nBricsCAD Civil LISP tools not available, check license level"))
You can play with the SETLICENSELEVEL command to see how these options work.
Jason Bourhill
CAD Concepts Ltd
cadconcepts.co.nz0 -
In BricsCAD the equivalent registry key would be FullVersion.
(vl-registry-read (strcat "HKEY_LOCAL_MACHINE\" (vlax-product-key)) "FullVersion")
But in your case this won't be useful, as this just tells you the BricsCAD version, not the equivalent AutoCAD.
Not sure that access to Aecc is possible like this via LISP? You may need to raise a support request to find out.
0 -
Thank you Jason for the quick response I have found though that Bricscad does not bury the database like CIV3D, I have been playing with get & setpropertyvalue and these change the surface property, so simple hopefully to work with the toolbar I have already. The use of inbuilt commands will be useful, as you point out using (vl-load-civil)
Just some precode examples. replace set with get etc
(setq ss (ssget "X" '((0 . "BsysCvDbTinSurface")))) ; if sslength >0 then surfaces exist.
(setq ent (ssname ss 0)) ; 1st surface
(setpropertyvalue ent "Triangles" 1) ;turns on Triangles given current surface style
(setpropertyvalue ent "Contours" 1)
(SETPROPERTYVALUE ENT "Major contours color" "2")(SETPROPERTYVALUE ENT "Major contours interval" 2.50000)
It is looking much easier than CIV3D at this stage. yes take into account in existing code multiple surfaces so choose surface to display properties. Yes I have redone the icons just use an old screen shot.
0 -
For any one to try would appreciate feedback, it is metric but you can change the values for imperial contours when testing. A mnu is supplied so can edit the icons and settings behind it.
I have only done limited testing with 2 surfaces. Just save to a preset support path.
0