Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add equational or reference dimension constraint with API?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
mucip
412 Views, 6 Replies

How to add equational or reference dimension constraint with API?

Hi,

I'am drawing some line/circle on sketch plane with VB-Express-API as below,

 

oSketch.DimensionConstraints.AddRadius(oArcL, oTransGeom.CreatePoint2d(oArcL.Geometry.Center.X - 0.5, oArcL.Geometry.Center.Y - Genislik - 0.5), False)

 

I want to put some dimension from equation or reference dimension. Like I put a dimension from other dimension in sketch plane by hand.

 

Is this possible in VB-Express-API?

 

Regards,

Mucip:)

6 REPLIES 6
Message 2 of 7
adam.nagy
in reply to: mucip

Hi,

 

I'm not sure what exactly you mean, but one thing that is usually helpful is to create whatever you need through the UI and then examine it through e.g. the VBA Watches window:

http://adndevblog.typepad.com/manufacturing/2013/10/discover-object-model.html

 

If you need more help then could you please provide a minimal part document with the dimension you need, and point out which exact dimension in the document you want to create programmatically.

 

Cheers, 



Adam Nagy
Autodesk Platform Services
Message 3 of 7
mucip
in reply to: adam.nagy

Hi,

I want to set one side to 3 times of the other side... Please check attached picture.

 

Side1=3*Side2

 

How can I get give this equation in VB API?...

 

Regards,

Mucip:)

Message 4 of 7
adam.nagy
in reply to: mucip

Have written a blog post on this:

http://adndevblog.typepad.com/manufacturing/2014/07/create-dimension-relative-to-other-dimension.htm...

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 5 of 7
mucip
in reply to: adam.nagy

Hi,

Thanks a lot. But my demand is little bit different. I want to create geometric shapes and reference dimension with VB Express API at the same time. I don't want to select dimension by hand.

 

 

I have VB Express API code which is draw slot on sketc. And I can set the dimension to the real quantites. But I want to set them to the other relativiliy. I need to give reference dimension. 

 

 

Is this possible?...

 

Regards,

Mucip:)

Message 6 of 7
adam.nagy
in reply to: mucip

Does not matter how you get to an object: whether as part of user selection or you created it.

 

"to the other relatively" - where does that other one come from?

If it's an existing one then you'll have to figure out how to get to it based on what the restrictions are: is it always a specific shape?, is it at a specific location?, etc.

If it's one you created, then you should have a reference to it already.



Adam Nagy
Autodesk Platform Services
Message 7 of 7
mucip
in reply to: adam.nagy

Hi Adam,

Yes. I got it. Perfect result thanks...

 

Regards,

Mucip:)

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

Post to forums  

Autodesk Design & Make Report