Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Parametric Values - Controling with LISP

5 REPLIES 5
Reply
Message 1 of 6
RockyBrown4134
1878 Views, 5 Replies

Parametric Values - Controling with LISP

Is there a way to get the value of a Parametric Parameter and controling with LISP?

 

If so, do you have any sample code you can share?

 

Thanks.

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
5 REPLIES 5
Message 2 of 6

Hi Rocky,

 

Can you explain more about what you need?

 

If you are talking about controlling constraints then you could use the AutoCAD .NET API. There is not any AutoLISP support for this. Maybe using .Net and AutoLISP together could be a solution.   



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Message 3 of 6

Example: In a drawing I have a block with a raint parameter controling the length.

I have a parameter called "OVL" for overall length. Let's say this is the distance between two supports.

I have a contraint parameter called "Length".  Length = OVL - thicknes1 - thickness2, where,

                                                                                                  for now, thicknes1 and thickness2 are constant.

 

Inside the drawing, i want to run a LISP command (macro, etc) and key in the overall length (OVL).

This allows the block to update acordingly, based on the formula above.

 

Note: this may not be the the only constraint parameter, or parameter. It could be more.

 

Right now, I have this block with a dynamic strecth and working the way I intended. But I want to eliminate the "manual" concept and make it "automated".

 

I have another post http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Dynamic-Block-Accessing-Action-Parame... looking at it from a Dynamic Block perspective.

 

I'm Old school and LISP is what I know, enough to get me in trouble. .Net I have never explored.

 

"Maybe using .Net and AutoLISP together could be a solution." - What would be a learning curve? Any Tutorials / articles / documentation available?

 

 

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
Message 4 of 6
DRossger
in reply to: RockyBrown4134

Hi!

 

It enough possible with ActiveX take a Look here /Dirk

Message 5 of 6
RockyBrown4134
in reply to: DRossger

Back from vacation, Thanks. I'll give this a look.

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
Message 6 of 6
RockyBrown4134
in reply to: DRossger

Good post. If the code flows like I think it does, it seems to be simple enough. But I don't know if I truly understand everything, yet. I have some questions that I would like to ask.

 

I saw the comment made about Activex, that I would like to know more about:

 

"It's using ActiveX instead of entget & entmod. That's because dynamic block properties are only accessible through ActiveX in AutoLisp."

 

I never got into ActiveX, so please understand where I'm coming from. Being "old school", it was easier to achieve the tasks through LISP. Are there any articles / tutorials for the "beginer", especially for an "old dog who wants to learn a new trick"?

 

Does ActiveX have anything to do with the VBA Application being loaded or not loaded? (I never got into VBA either, only enough to screw things up.)

 

Just for adding to the conversation........I read in another response above (Wayne Brill), that .NET was another way to possibly go.  With that said, what would be easier to learn, ActiveX or .Net?

 

Is it just a "Preferance thing"?

 

Mr. Brill, I would like your input also.

 

Thanks

 

 

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost