4o4osan,
我相信我可能已经弄明白了。我在考虑如何将“UseMaxTriangleLen”属性的值设置为true,但我们的“TriangleLenMax”仍然设置为零。使用这些参数,不会创建最大三角形长度为零的曲面。因此,我需要将最大三角形长度设置为大于零的值,然后将“UseMaxTriangleLen”设置为true。
我使用了以下代码,能够设置值。
- ;first we need to get the Civil 3D Application Interface
- (setq app (vlax-get-or-create-object "AeccXUiLand.AeccApplication.10.3"))
- ;Next we need to get the Active Document:
- (setq ad (vlax-get-property app 'ActiveDocument))
- ;From there we get the settings:
- (setq settings (vlax-get-property ad 'Settings))
- ;Then the Surface Command Settings:
- (setq surfcomset (vlax-get-property settings 'SurfaceCommandsSettings))
- ;Then the Create Surface Settings:
- (setq createsurfset (vlax-get-property surfcomset 'CreateSurfaceSettings))
- ;Then we finally reach the Build Options Settings:
- (setq buildoptionset (vlax-get-property createsurfset 'BuildOptionsSettings))
- ;Next We need to set our maximum triangle length
- ;Get the TrianglLenMax property
- (setq trimaxlen (vlax-get-property buildoptionset 'TrianglLenMax))
- ;Set the value to something other than zero.
- (setq tml (getreal "\nEnter Maximum Triangle Length: "))
- (vlax-put-property trimaxlen 'Value tml)
- ;Then we need to get the UseMaxTriangleLen Property
- (setq UseMaxTriLen (vlax-get-property buildoptionset 'UseMaxTriangleLen))
- ;We can set the vlaue of this to true or false using :vlax-true or :vlax-false
- (vlax-put-property UseMaxTriLen 'value :vlax-true)
上述代码在Civil 3D 2014上进行了测试。您可能需要编辑Civil 3D 2013的代码。为此,在检索应用程序接口时,将值10.3更改为10.0。
如果这对你有效,请告诉我。
当做
hippe013 |