几何尺寸与公差论坛

 找回密码
 注册
查看: 793|回复: 0

【转帖】moving from autocad lisp to sw macros

[复制链接]
发表于 2009-4-13 12:57:10 | 显示全部楼层 |阅读模式
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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 14:36 , Processed in 0.035811 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表