![]() |
|
Bitte drücken Sie nicht mehrfach auf "Antwort speichern".
*Ist HTML- und/oder UBB-Code aktiviert, dann können Sie HTML und/oder UBB Code in Ihrem Beitrag verwenden.
Beiträge: 11 / 0 DELL-Precision 3530/Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz 2.59 I want to define a command for making holes quickly, here is my code, SFace is the selected face, RePnt is the selected 3D point, They are correct.but I am running, the system prompt "parameter not fully defined", is a custom feature does not support Lisp? ------------------ Beiträge: 2016 / 3 ● PE6+8@home create_custom_feature is just a UI-wrapper which opens the custom feature browser. No need to do so when calling programmatially. change I did not execute that code. ------------------renchaoroy
GHZ/16.0 GB/Windows 10 Home/20H2/OS revision19042.985/DirectModeling (x64edition)/Revision: 19.0/Datecode: F000(19.0.0.790,09-May-2014)Hi My Friends,
Code:
(defun psd-make-hole(SFace YFace SNum)
(let (AllFace RePnt
(OwnerPart (sd-inq-parent-obj SFace))
(SFCenter (sd-vec-scale (sd-vec-add(sd-face-ll-pnt (sd-inq-face-geo SFace :Dest-space :global))(sd-face-ur-pnt (sd-inq-face-geo SFace :Dest-space :global))) 0.5)))
(setf AllFace (sd-call-cmds (get_selection :focus_type *sd-plane-seltype* :select :in_part OwnerPart :all_3d)))
(setf RePnt (sd-vec-translate SFCenter (sd-plane-normal(sd-inq-geo-props YFace :Dest-space :global)) (- (sd-call-cmds (measure_dist oint_surface SFCenter YFace)) (+ 4 (/ SNum 2)))))
;;The error occurred in the following code
(create_custom_feature mach_adv_library_countersunk_throughhole :action :create
:sel_face SFace
:cen_pnt RePnt
:axis (sd-plane-normal(sd-inq-geo-props SFaces :Dest-space :global))
:Drill_dia SNum
:chamfer_depth 0
:chamfer_angle 90
:back_chamfer_depth 0
:back_chamfer_angle 90
:name "hole")
)
)
Thanks
A mechanical engineer who loves to program der_Wolfgang
● W10 Pro Build19044.2364
● Drafting V17~V20.5.1
● Modeling V17~V20.5.1your command recording isn't accurate enough, I think. Code:
(create_custom_feature mach_adv_library_countersunk_throughhole :action :create
toCode:
(mach_adv_library_countersunk_throughhole :action :create
and better use a sd-call-cmds around it ...Code:
(sd-call-cmds (mach_adv_library_countersunk_throughhole :action :create
....
)
● Firefox ESR ● Java Forum Stuttgart JUGS ● OSD Hilfeseite (de) / help page (en) ● NotePad++ ● BuFDi ●