100% Automated Drawing Creation without relocating, recreating, reattaching dims

100% Automated Drawing Creation without relocating, recreating, reattaching dims

rfink
Enthusiast Enthusiast
2,158 Views
5 Replies
Message 1 of 6

100% Automated Drawing Creation without relocating, recreating, reattaching dims

rfink
Enthusiast
Enthusiast

Can drawings be created 100% automatically with the API without having to relocate, reattach, or recreate dimensions/annotations that get orphaned when dimesions change or features get suppressed/un-suppressed. Was the API intended for this purpose. 

I have automated .ipt models with VBA from MS Excel. The model automatically supresses and un-suppresses features and changes driving dimesions based on inputs and selections from the Excel VBA application.

However, I am having trouble automating the drawings because dimesions keep getting orphaned. As I cannot get a key reference to the intent geometry, I cannot re-attached the orphaned dimensions. I suspect that, because the drawing view needs to be generated from the model, the dimesions and intent geometry do not persist and need to be regenrated every time the drawing is opened or updated. 

Regardless, I just need to know if I am wasting my time trying. Can the API completely automate 100% finished drawings?

0 Likes
Accepted solutions (1)
2,159 Views
5 Replies
Replies (5)
Message 2 of 6

rikard.nilsson
Collaborator
Collaborator
Accepted solution
Hi,

Yes you can!
I have two tips for you..

1) Create views, dims, text with API... and delete them all before adding them again after change of model.
2) Place dims to work points.

/Rikard
Message 3 of 6

rfink
Enthusiast
Enthusiast

Rikard,

 

I am currently trying to create dimensions using the kParameterIntent enum value to create geometry intent. Would you happen to have any reference material or a sample showing how to locate a diameter general dimension on a precise location on a drawing curve?

 

Best Regards,

 

Ross

0 Likes
Message 4 of 6

rikard.nilsson
Collaborator
Collaborator

Hi,

 

I don't really understand what you want..

But I have attached a simple part and drawing.

In the drawing there is a rule that you can Run to place a diameter dimension.

 

In the rule I have a row that sets the angle the dimension should be placed at.

 

Dim angle As Double = PI/4

 and in the following row I have hard coded the distance from view center 7 cm from center. This is something you have to code yourselft.. This is just a qiuck example..

 

Dim textPosition As Point2d = ThisServer.TransientGeometry.CreatePoint2D(viewCenter.x+Cos(angle)*7, viewCenter.y+Sin(angle)*7)

 

And more importent thing.. I use the teqnique to find the drawing curve by placing an axis in the center of the cylinder. If you have some other way to solve this you can add that instead. See my TestAxis in the part...

 

I hope this gives you some idea how to solve your problem.

 

/Rikard

0 Likes
Message 5 of 6

rfink
Enthusiast
Enthusiast

Rikard,

 

My question is this:

 

1) regarding dimensioning of a circular drawing curve on a drawing

2) how do I create a Geometry Intent of type kParameterIntent, enum value 58115  ?

3) as referenced in the API help :  GeometryIntent Object -> Intent Type = kParameterIntent -> Intent = double value indicating the parameter on the input curve geometry.

 

I need to know how to use this to create a diameter general dimension. While I can get it to create the dimension, I cant determine how to consistently locate the dimension. I do not want to use the end point, mid point, or start point.

 

Any help would be appreciated.

 

Ross

0 Likes
Message 6 of 6

rikard.nilsson
Collaborator
Collaborator

Sorry.. I have no clue how to help you..

 

Create a new post and hope for someone else to help you..

 

/Rikard