.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Parametric Constraints

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
JamieVJohnson2
2792 Views, 9 Replies

Parametric Constraints

Hello everybody,

 

This may be a bit advanced, but I REALLY want to get programatic control over parametric constraints (acad 2011).  I have created a dynamic block with all these constraints, but now I want to create the block from near scratch all in code.  You see there will be some general common elements and then some random per project elements, that I need to set some simple constraints within the block.  (Coincident, Tangent, Aligned-dimension).

 

I have read the arx guide at Developer Guide / Advanced Topics / Associative Framework, and I actually understood most of it this time!  It would be REALLY nice if anybody had an example of how to use this system (managed or not, for I am a vb.net developer at first).  I have searched around and find nobody is programming to parametric constraints and telling about it.  Please help.

 

Thank you,

 

jvj

jvj
9 REPLIES 9
Message 2 of 10

Hi Jamie,

 

I am responding because no one else did.  I haven't had the time to get into Dynamic blocks yet.

 

That said, there is a post on Through The Interface which deals with accessing Dynamic properties, here:

 

http://through-the-interface.typepad.com/through_the_interface/2009/03/accessing-the-properties-of-a...

 

It was written using 2009 Acad, and Kean specifically replies to a Comment saying that there is (was) no API exposed for manipulating a Dynamic Block Definition, only references.  I took a quick look through my object browser in 2010, and I don't see anything there either, so unless this API is newly exposed in 2011, you may be out of luck. 

 

I would suggest going to the TTIF post and leaving a comment for Kean, asking if this is still the case.

Dave O.                                                                  Sig-Logos32.png
Message 3 of 10

Hello chief, long time no read...

 

Yea some 2 years ago, I did a project with dynamic blocks and have a good handle on the concept.  Its the Parametric Constraints (Inventor's sketch constraints, such as a tangent constraint between a circle and a line), that came in with 2010, that I don't have an API for.  Several other guru's have complain about this as well, but has anybody figured something out?

 

Thanks,

 

jvj

jvj
Message 4 of 10
LE3
Advocate
in reply to: JamieVJohnson2

I do not have a job, so have a lot of time to play, with the api...

 

I have done some commands in ObjectARX with this... and have tried to port it into C#. Can't post the whole code, but to give an idea, attached it is an image of some portion of my code, and yes there is nothing open et-al that one can find, that you can use as a guide.

Just to fill my curiosity, any of you work as a programmer, doing AutoCAD based applications? using C++, ARX, MFC, Custom Objects, C#, etc? for a software or an architectural/engineering company ? - or - it is just a hobby.

Thanks!

Message 5 of 10

As a CAD Manager (3 to 35 size CAD Staff(s)) I've been programming professionally (various languages and platforms) for 6 years, and 3 companies now.  ALL Learned the hard way (unless I get a good book)!  Once they find out what can be done, they begin to ask for very advanced tools.  I'll take a look at your code, and see what I can make of it.

 

Thanks,

 

jvj

jvj
Message 6 of 10

Sweet!

 

This is wrapped in VB.Net and I can use the classes in vb!  One quick question tho, what is the purpose of "MyDict" string name of an NOD dictionary?  Is that a custom dictionary or is there a standard dictionary (already named) I need to find?

 

I'm all over this,  hopefully soon I'll be able to hand the community some functional tools.

 

Thanks,

 

jvj

jvj
Message 7 of 10
LE3
Advocate
in reply to: JamieVJohnson2

Hello,

I frequent this site:

http://through-the-interface.typepad.com/

And just noticed, and appears there it is now a sample about it from a class at the AU2010 by Stephen Preston.

Creating Geometric and Dimensional Constraints Using the AutoCAD® .NET API

HTH.-

Message 8 of 10

Now that hit the spot!  From Stephen's work I have a full belly of code examples, starter video and text to digest for weeks.  Like a loaded turkey dinner followed by a table full of deserts, with a honey cured ham dinner the next day, and a smoked BBQ dinner after that...  I will be re-arranging some of the code Stephen wrote to fit my design principals, but for any beginner there's loads of copy+paste goodies ready to use.  Thank you everybody!Robot Very Happy

 

jvj

jvj
Message 9 of 10

Hello Community,

 

Chew on this for a while.  Perhaps some new tools, ehancements, advanced CAD fun can come from it.  Not everything is here, but it is a nice head start.

 

jvj

jvj
Message 10 of 10

nice job

 

have you completed this? do you have some sample to show how to use methods?

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost