可不可以删除原先的剖面线重新打上,参考一下我这一个:- (defun c:MH ()
- (setq ent (entsel "\n 选择要修改的剖面线: "))
- (setq ent0 (car ent) p0 (cadr ent))
- (setq obj (vlax-Ename->Vla-Object ent0))
- (setq P-Angle (vla-get-PatternAngle obj))
- (setq P-Name (vla-get-PatternName obj))
- (setq P-Scale (vla-get-PatternScale obj))
- (setq p-Layer (vla-get-Layer obj))
- (command "erase" ent0 "")
- (command "-bhatch" "p" P-Name P-Scale P-Angle p0)
- (while (setq point (getpoint))
- (command point)
- )
- (command "")
- (setq obj (vlax-Ename->Vla-Object (entlast)))
- (vla-put-Layer obj p-Layer)
- )
|