你可以通过VL进入civ3d AEC数据,最大的问题是你必须知道保存信息的变量名,这通常不是它的名称。
你应该能够获得mep数据,但同样你需要知道你在寻找什么。
- this just opens up the AEC database and is version dependant
- (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
- ((vl-string-search "R18.2" vrsn) (setq appstr "9.0")) ;12 ?
- ((vl-string-search "R19.0" vrsn) (setq appstr "10.0")) ;13
- ((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
- this is an example of opening the surfaces list
- (vlax-for j (vlax-get *AeccDoc* 'SurfaceS)
- (setq lst (cons (cons (vla-get-name j) j) lst))
- )
- surface styles
- (vlax-for i (vlax-get *AeccDoc* 'SurfaceStyles)
- (setq lst (cons (cons (vla-get-name i) i) lst))
- )
|