Author Topic: AutoCAD electrical cross-referencing  (Read 146 times)

0 Members and 1 Guest are viewing this topic.

vincent.r

  • Newt
  • Posts: 63
AutoCAD electrical cross-referencing
« on: June 25, 2020, 06:40:17 AM »
Do anybody know how to put cross-reference programmatically in AutoCAD Electrical ? I tried to find in AutoCAD Electrical API but nothing was there.

Thanks in Advance


d2010

  • Newt
  • Posts: 50
Re: AutoCAD electrical cross-referencing
« Reply #1 on: June 26, 2020, 01:58:41 PM »
Do anybody know how to put cross-reference programmatically in AutoCAD Electrical ? I tried to find in AutoCAD Electrical API but nothing was there.
Thanks in Advance

Other method, you can inject all math-equations-electrical directly in visua-lisp.
You do not need C# or ObjectARx
Code: [Select]
/*c2s: c=nil, a=c, x4=c, k2=c, f1=c, f2=c, f3=c, tg=c, r=c, te='e', f1=list(a154,b154,c154,d162,x142), f2=dfn_list_searchnotreal(f1)cr=dfn_var_isreal(f143)r=(f2==nil)?f2:nth(f2,list("a154","b154","c154","d154","x142"))if(r==nil){ ab=abs(a154), bc=abs(b154), cd=abs(c154), da=abs(d154), su=abs(x142), k2=cd*cd+bc*bc, k2=(da*da+ab*ab-k2)/2.0, x4=4*su*su+k2*k2, x4=ab*ab*da*da-x4 if(x4)c=x4-cd*cd*bc*bc, c=(-c)/(2*cd*bc)if(c)a=abs(2*su), b=-k2, r=dfn_realec_sinpcos(a,b,c)} */

Code: [Select]
(setq c nil a c x4 c k2 c f1 c f2 c f3 c tg c r c te(chr 101)f1(list a154 b154 c154 d162 x142)f2(dfn_list_searchnotreal f1))(setq cr(dfn_var_isreal f143))(setq r(if(= f2 nil)f2(nth f2(list"a154""b154""c154""d154""x142"))))(if(= r nil)(progn(setq ab(abs a154)bc(abs b154)cd(abs c154)da(abs d154)su(abs x142)k2(+(* cd cd)(* bc bc))k2(/(-(+(* da da)(* ab ab))k2)2.0)x4(+(* 4 su su)(* k2 k2))x4(-(* ab ab da da)x4))(if x4(setq c(- x4(* cd cd bc bc))c(/(- c)(* 2 cd bc))))(if c(setq a(abs(* 2 su))b(- k2)r(dfn_realec_sinpcos a b c)))))