Author Topic: Quickly building parametric dialog and it's driver-function , Let's share  (Read 2204 times)

0 Members and 1 Guest are viewing this topic.

chlh_jd

  • Guest
I know a little of DCL Programming , In my eyes , DCL Programming is a trouble , especially for non-modal dialog; Many times , I'm more willing to write dialog

with Owenwengerd 's Opendcl  . http://www.opendcl.com , Thanks Owen a lot .

However ,  AutoDesk DCL is tailored to Vlisp, it has many advantages, such as good compatibility;
 
I think to write a portable function to quickly build a dialog file and its driver function .

In order to let this building function to be more robust and suitable , Let's share .
« Last Edit: March 26, 2014, 03:45:56 PM by chlh_jd »

chlh_jd

  • Guest
Here's the function I used . Copy from WJM'S functions http://www.jgcad.com ( I'm sorry that I don't know where is it refering from , Maybe is your work , Thank you very much) .

chlh_jd

  • Guest
E.G. (Because less of time , I haven't translate the Chinese into English , I express regret .)
Code - Auto/Visual Lisp: [Select]
  1. (defun c:test  (/ initlist dialog_column_name)
  2.   (setq Global_Args
  3.          (quote (gsls_crane_attrod_cal_IF_Cnd
  4.                   gsls_crane_attrod_cal_IF_Nw
  5.                   gsls_crane_attrod_cal_IF_Mw
  6.                   gsls_crane_attrod_cal_IF_a1
  7.                   gsls_crane_attrod_cal_IF_a2
  8.                   gsls_crane_attrod_cal_IF_b1
  9.                   gsls_crane_attrod_cal_IF_b2
  10.                   gsls_crane_attrod_cal_IF_c
  11.                   gsls_crane_attrod_cal_IF_J)))
  12.   (setq initlist (list (list "Slide_test" "27" "sld")
  13.                        (list
  14.                          "gsls_crane_attrod_cal_IF_Cnd"
  15.                          "塔吊附着杆内力计算工况"
  16.                          "list"
  17.                          "itemlst-varname"
  18.                          "0"
  19.                          "4")
  20.                        (list "gsls_crane_attrod_cal_IF_Nw"
  21.                              "风荷载引起水平力(kN)"
  22.                              "real")
  23.                        (list "gsls_crane_attrod_cal_IF_Mw"
  24.                              "塔身Z轴扭矩(kN*m)(非工作状态取0)"
  25.                              "real")
  26.                        (list "gsls_crane_attrod_cal_IF_a1"
  27.                              "附着点1到塔吊的横向距离(m)"
  28.                              "real")
  29.                        (list "gsls_crane_attrod_cal_IF_a2"
  30.                              "附着点1到附着点2的横向距离(m)"
  31.                              "real")
  32.                        (list "gsls_crane_attrod_cal_IF_b1"
  33.                              "附着点1到塔吊的纵向距离(m)"
  34.                              "real")
  35.                        (list "gsls_crane_attrod_cal_IF_b2"
  36.                              "附着点2到塔吊的纵向距离(m)"
  37.                              "real")
  38.                        (list "gsls_crane_attrod_cal_IF_c"
  39.                              "塔吊边长(m)"
  40.                              "real")
  41.                        (list "gsls_crane_attrod_cal_IF_J"
  42.                              "第2杆所在节点,1 或 2"
  43.                              "real")))
  44.   (setq itemlst-varname (list "工作状态" "非工作状态"))
  45.   (setq dialog_column_name "塔吊附着杆(3杆)最大轴力求解程序")
  46.   (mapcar (function (lambda (a b)
  47.                       (or (eval a) (set a b))))
  48.           Global_Args
  49.           (list "工作状态" 93.827 332.0 1.85 5.5 4.1 5.9 1.6 1.0))
  50.   (princ (init-dcl initlist nil))
  51.   (princ))
  52.  
« Last Edit: March 26, 2014, 03:43:46 PM by chlh_jd »

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
I guess I am confused on the sharing part, you are posting someone else s code (not sure who's) and want us to share our code with you, seems your not sharing at all.

Q1241274614

  • Guest
thank!

chlh_jd

  • Guest
I guess I am confused on the sharing part, you are posting someone else s code (not sure who's) and want us to share our code with you, seems your not sharing at all.
Hi snownut , I'm sorry for my poor English , Perhaps you misunderstood me .
This function is I always used , and I has changed it much . I sign out it's website , meant that I do not know who first take out this idea and construct the initial function .
I'll take time to figure out who is the first author , but don't sure can get it .
« Last Edit: March 27, 2014, 12:29:28 AM by chlh_jd »

chlh_jd

  • Guest