cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

INSERT_DRW_SHEET

bnoll
3-Visitor

INSERT_DRW_SHEET

First off, I will introduce myself. I am an 18+ year employee for Johnson Controls Inc., formerly known as York Internation Corp. I had currently resided in the Engineering IT organization for 15 of those years and have since moved to a specific product line to start some automation tasks with Pro|E. We currently run Windchill 10.0 and Pro|E Wildfire 4.0 (not by choice). I have dabbled in SmartAssembly off and on for years, so I have some knowledge.


With my current project, I am automating the creation of a data nameplate. I have a template Pro|E part that has sketch text that is driven by part parameters. I also have a template drawing that is attached to this part, which has all the needed views and dimensions associated.


With that said, my SA program works wonders with extracting the data from Excel, pushing the data to Pro|E and updating the drawing (while in session). I am currently struggling with Pro|E recognizing there is a change happening to the drawing, so it will save with the new data displayed each time.


This is typical interaction with Pro|E, where I would "trick" it into thinking it has changed by adding a new sheets, tweek a parameter or edit relations. My thought is, if I cannot force the save in Pro|E, there is likely no magical command in SA that will let me do so.


OK, so I am adding code to add a new drawing sheet and then delete the sheet (my form of "tricking" Pro|E). I have already made reference to the drawing (tested with a Print statement) as REFDRW. I have entered the following command only to recieve a program error upon execution:


INSERT_DRW_SHEET REFDRW 2

REMOVE_DRW_SHEET REFDRW 2


The program gives the following error: ERROR in Line 252: INSERT_DRW_SHEET REFDRW 2


To me I would expect the creation of the 2nd sheet failed, but when I activate the drawing, the 2nd sheet exists. Of course at this point the program stops and I am never able to tell if the remove sheet and save then work.


So, I am looking for suggestions. Have others ran into sisutations where Pro|E does not think changes happened and what you may do to get around that.


Any help is appreciated.


Brian

This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
8 REPLIES 8
TomU
23-Emerald IV
(To:bnoll)

I've had issues in the past where I've made changes to a model, but Pro/e didn't think a change had happened, so it wouldn't let me save. I know in part/assembly mode you can do a "REGEN_MDL <model_reference> FORCE". I don't know if this will work on a drawing or not.

Tom U.
TomU
23-Emerald IV
(To:bnoll)

Maybe try the "UPDATE_DRW_VIEWS" command....

Welcome to the forum, Brian! Have you tried changing the sheet number to 1 for the INSERT_DRW_SHEET command? The admin guide is a little ambiguous about how it works.


Design well!

bnoll
3-Visitor
(To:bnoll)

Tom -


Yep, I am forcing the regen on the model since I have NO_REGEN as I am passing paramter values into the model. Does not look like I can use this to do the same for the drawing. I also update the drawing views to no avail. Even when I manually do the process in Pro|E, the update of the views is not enough to make it think it has changed.



Geoff -


I have tried, 2 and also 1 to no avail with the insert sheet command. Just seems really odd to me that it fails, but it actually adds the sheet. Of course once it fails, the application stops.



Thanks for the responses fellows... If something else pops up that you might think of, let me know. In the meantime I will see what I can find out today.

bnoll
3-Visitor
(To:bnoll)

I will say, the insertion of the 2nd sheet is enough to "trick" Pro|E to save the drawing. So my method will work, if I can find out why the comand is failing. Today I will attempt to insert a note and then delete it as a 2nd option.

Brian,


Try adding a REGEN_MDL REFDRW in between the Insert and Remove commands.


If the command set continues to fail, you should log this as a tech support ticket on our portal so that we can review it with you and find the proper solution.


Joel Beckley


Application Engineer


SIGMAXIM

szundel
1-Newbie
(To:bnoll)

Brian,



If the point is to let Creo know that the object is modified and ready for a save, try SET_MDL_MODIFIED.


This way there is no need to "trick" Creo.

Back in 2000, I didn't work here yet, my company had a similar problem with Pro/E (2000i I think?).

They started using a REG_CURVE, which was a small curve built into the startparts. At each regen it would vary in length, 20 to 25mm and back. Thus convincing Pro/E the part and drw has changed.

However, this has become a nussance in the new Creo, and it took a lot of programming to get rid of it. So I don't think it's a good solution...

Top Tags