几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-04-13, 12:57 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】moving from autocad lisp to sw macros

moving from autocad lisp to sw macros
i'm currently using both autocad and sw to design and just want to use sw. i have several lisp files that i want to bring into sw but they are not compatible with sw or the dwg editor. how can i do this without rewriting and saving all of the files to sw compatible extensions?
lisp files are autocad format if i am correct. there language or at minimum objects are not the same as sw, so re-writing them is probably the only way
i was afraid of that answer. will the lisp files also not work with dwg editor? i'm not a programmer and i've recently gotten my hands on several vb and api books to learn from. my dept is trying to move away from autocad and i was just given a new computer without the program on it. so i'm kind of forced to find a way to design in sw, but i need those lisp files to do any kind of work. is the code drastically different from vb that i can't just copy/paste and clean up misc coding?
originally posted by: angela dobbins
will the lisp files also not work with dwg editor?
correct, they will not work with dwg editor.
originally posted by: angela dobbins
my dept is trying to move away from autocad and i was just given a new computer without the program on it. so i'm kind of forced to find a way to design in sw, but i need those lisp files to do any kind of work.
what did those lisp file do that prevents you from using solidworks without them?
originally posted by: angela dobbins
is the code drastically different from vb that i can't just copy/paste and clean up misc coding?
you will not be able to copy and paste, and clean up the problems very easily. it is probably best to just start over.
there is a reference guide in autocad that lists all the lisp functions, and compares them to an equivalent acad vba function. you could try to re-write your lisp files to autocad vba, and then to sw vba. i am not a programmer, and all my macros are fairly simple, so i might not have the most insight into your problem, but that doesn't seem like a very efficient way to get the finished macros in solidworks.
depending on how important these macros are to your company, and the time frame you have to convert them, another option would be to contact your sw var and explain to them what you need done. they should be able to get a quote set up for your company on getting the macros converted, or just rewritten.(assuming they also sell, or work with autocad)
drc inc.
minneapolis, mn
.designreadycontrols.com
sw2007 sp5.0
core2 quad
3gb ram
xp pro sp2
ati firegl v3600
what did those lisp file do that prevents you from using solidworks without them?
the lisp files created sketches based on user input which is the starting point of all of our designs. another makes a complete dwg from sketch points that we pick and other information we put in. it adds a table with calculated dimensions from those points and will include a list of part numbers. i could do all of this myself but it would take me 2 1/2 times as long to calculate, make the dwg, etc. i have looked at one company that writes programs, but i don't know if they work with autocad.
it has been 8 or 9 years since i worked with lisp but i can tell you it is an entirely different language. it is more like the older basic language in that it doesn't use objects. the last time i worked with autocad 4 yrs ago i used their vba which uses objects so is closer to solidworks but is still not a copy paste sort of thing because the objects and properties are so different. among other things lisp used reverse notations for calculations. there were other differences that will make it difficult to copy paste. i would have to dig out my old books to remember exactly how they were different. you will need to start from scratch.
dan miel
sw 2008
attach one or two of the lisp files and i'll take a look at them and see what it might take to convert them.
dan miel
not knowing what is in the sketches, have you tried to use the variational geometry capabilities of swx and just drive the dimensions? (ie if the sketch is basically the same but just different sizes?) you may want to look into a rules based system like driveworks (driveworksxpress comes in 2008) or rulestream to accomplish your goals. just a thought.
i discussed my problem with the other engineers and it looks like we might try a more creative and more accurate way of designing. so i won't need to rewrite the macros after all. thanks everyone for the advice.
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
Scheme 程序语言介绍之一 huangyhg 专家系统 6 2010-02-18 01:22 PM
【转帖】macros locked by users yang686526 SolidWorks二次开发 0 2009-04-13 12:44 PM
【转帖】blocks-autocad to sw yang686526 SolidWorks二次开发 0 2009-04-13 09:18 AM
How to start SW 2007 or SW 20006 via SW API? If I have two different versions of SW yogy SolidWorks二次开发 1 2007-05-21 09:19 AM
如何在VB中连接AutoCAD cad DirectDWG 1 2007-01-28 04:05 PM


所有的时间均为北京时间。 现在的时间是 06:34 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多