Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using ilogic to find sketch point locations

4 REPLIES 4
Reply
Message 1 of 5
ad64
2127 Views, 4 Replies

Using ilogic to find sketch point locations

I would like to use iLogic to find the location of the points of a line, determine if the line is approximately vertical, and apply a vertical constraint if it is vertical.

 

Here is the code process I envision:

 

1. Automatically select a straight line.

2. Find the location of its end points.

3. Compare the X-value of the end points to see if they are vertically aligned (or almost so).

4. If they are vertically aligned, apply a vertical constraint.

5. Select next line and repeat.

 

Is this possible with iLogic? I don't see any way of calling a line's sketch points or finding their location.

 

Steve

4 REPLIES 4
Message 2 of 5
FProcp
in reply to: ad64

iLogic is good at editing model parameters that have defined names such as d0, d1, "my_width", etc.

 

I don't think it can find un-named properties of objects such as lines and end-points which Lisp in AutoCAD can easily do?

Franco
GMT +08:00
Message 3 of 5
ad64
in reply to: ad64

I was actually able to solve this problem and create code that helps clean up badly constrained or dimensioned sketches. This is what it can automatically do (depending on what the user selects):

 

1. Delete all dimensions (optional).

2. Delete all constraints by type based on user input (optional).

3. Analyze the sketch and apply vertical constraints to all lines which are within a user-specified tolerance of being vertical (optional).

4. Analyze the sketch and apply horizontal constraints to all lines which are within a user-specified tolerance of being horizontal (optional).

5. Analyze the sketch and apply tangent constraints to all lines or arcs which are within a user-specified tolerance of being tangential to other arcs (optional).

 

If there is interest, I could share the code.

 

Message 4 of 5
Curtis_Waguespack
in reply to: ad64

Message 5 of 5
ad64
in reply to: Curtis_Waguespack

Hi Curtis,

 

I realize this thread is a year old, but, if you're still interested, I've polished up this code and used it as part of the Sketch Repair Tool that I posted here:

 

http://forums.autodesk.com/t5/Autodesk-Inventor/Using-ilogic-to-find-sketch-point-locations/m-p/3537...

 

Thanks,

Steve

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

Post to forums  

Autodesk Design & Make Report