这是可能的。我建议您在模型空间上调用“AddSection”方法,而不是使用entmake。这个过程非常简单,然后你就不需要找出需要修改的dxf代码了。我只展示了一些粗略的代码来帮助您开始。
- (setq p1 (getpoint "\nSelect first point:")) ;First Point of your section
- (setq p2 (getpoint "\nSelect second point:"));Second Point of your Section
- (setq v1 '(0 0 1));Plane Vector - (0 0 1) is straight up
- (setq *acad* (vlax-get-acad-object));Get the ACAD object
- (setq *ad* (vlax-get-property *acad* 'ActiveDocument));Get the Active Document
- (setq *ms* (vlax-get-property *ad* 'ModelSpace));Get the Model Space
- (setq section-object (vlax-invoke-method *ms* 'AddSection (vlax-3d-point p1)(vlax-3d-point p2)(vlax-3d-point v1)))
- ;Invoke the addsection method - Arguments is first point - next point - plane vector (All as variants)
使用
查看需要编辑的属性。希望这有帮助! |