-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template name passed to drawing in WindChill with drawing_create #19
Comments
IS that the PTC_COMMON_NAME that is not changing? If so - you have to set
that as a parameter value .... I believe.
Dave
…On Fri, Jul 17, 2020 at 2:40 PM victoman1234 ***@***.***> wrote:
- Creopyson version: 0.5.2
- Creoson version: 2.6.0
- Python version: 3.7
- Operating System: Windows 10 Pro 64-bit
Description
Using the drawing_create command to create and save to windchill a new
drawing with the Part Name as the Drawing Name.
The drawing is created properly but the name of the selected Drawing
Template is used as the name of the new drawing in WindChill. The new
drawing has the correct File Name, has the correct Number but does not have
the correct name in WindChill.
###What I did
import creopyson
c = creopyson.Client()
c.connect()
c.server
cprint = c.sessionId
print("\n" + "session Id = " + cprint)
c.drawing_create("bmh_d_eng_detail")
c.disconnect()
[image: 2020-07-17 14_31_02-HEXBOLT-1_2-13X1_5 Rev_ New 0 0+ In Work
(Active) - Creo Parametric]
<https://user-images.githubusercontent.com/68441212/87819976-340b4180-c83b-11ea-8fb6-7ba9e21c9588.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMSRJLY26CYKN4MDLTJXJ3R4CLK7ANCNFSM4O6WLQMQ>
.
--
David Bigelow, President
Simplified Logic, Inc <https://www.simplifiedlogic.com> | SimilarParts.ai
C: 317-431-5454
|
In the creoson code, there is a section where it sets the drawing's "common
name" to the drawing's root file name -- but ONLY if Creo says that the
common name is modifiable. Essentially, this:
if (drw.IsCommonNameModifiable()) { // Creo call
String commonName = (drawing's file name with the extension
removed)
drw.SetCommonName(commonName); // Creo call
}
else
(print a line to error output that the common name could not be
modified)
I'm guessing that the "common name" corresponds to PTC_COMMON_NAME, and
maybe something's set so it can't be modified.
Adam Andrews
On Fri, Jul 17, 2020 at 6:03 PM David Bigelow <[email protected]>
wrote:
… IS that the PTC_COMMON_NAME that is not changing? If so - you have to set
that as a parameter value .... I believe.
Dave
On Fri, Jul 17, 2020 at 2:40 PM victoman1234 ***@***.***>
wrote:
>
> - Creopyson version: 0.5.2
> - Creoson version: 2.6.0
> - Python version: 3.7
> - Operating System: Windows 10 Pro 64-bit
>
> Description
>
> Using the drawing_create command to create and save to windchill a new
> drawing with the Part Name as the Drawing Name.
>
> The drawing is created properly but the name of the selected Drawing
> Template is used as the name of the new drawing in WindChill. The new
> drawing has the correct File Name, has the correct Number but does not
have
> the correct name in WindChill.
>
> ###What I did
>
> import creopyson
> c = creopyson.Client()
> c.connect()
> c.server
> cprint = c.sessionId
> print("\n" + "session Id = " + cprint)
> c.drawing_create("bmh_d_eng_detail")
> c.disconnect()
>
> [image: 2020-07-17 14_31_02-HEXBOLT-1_2-13X1_5 Rev_ New 0 0+ In Work
> (Active) - Creo Parametric]
> <
https://user-images.githubusercontent.com/68441212/87819976-340b4180-c83b-11ea-8fb6-7ba9e21c9588.png
>
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#19>, or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAMSRJLY26CYKN4MDLTJXJ3R4CLK7ANCNFSM4O6WLQMQ
>
> .
>
--
David Bigelow, President
Simplified Logic, Inc <https://www.simplifiedlogic.com> | SimilarParts.ai
C: 317-431-5454
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANPKPHNJTNUDPZC52GYLI3R4DDC5ANCNFSM4O6WLQMQ>
.
|
PTC_COMMON_NAME can be set by a parameter set call... I am pretty sure
(assuming that is the issue / solution).
On Fri, Jul 17, 2020 at 9:31 PM adama2000 ***@***.***> wrote:
In the creoson code, there is a section where it sets the drawing's "common
name" to the drawing's root file name -- but ONLY if Creo says that the
common name is modifiable. Essentially, this:
if (drw.IsCommonNameModifiable()) { // Creo call
String commonName = (drawing's file name with the extension
removed)
drw.SetCommonName(commonName); // Creo call
}
else
(print a line to error output that the common name could not be
modified)
I'm guessing that the "common name" corresponds to PTC_COMMON_NAME, and
maybe something's set so it can't be modified.
Adam Andrews
On Fri, Jul 17, 2020 at 6:03 PM David Bigelow ***@***.***>
wrote:
> IS that the PTC_COMMON_NAME that is not changing? If so - you have to set
> that as a parameter value .... I believe.
>
> Dave
>
> On Fri, Jul 17, 2020 at 2:40 PM victoman1234 ***@***.***>
> wrote:
>
> >
> > - Creopyson version: 0.5.2
> > - Creoson version: 2.6.0
> > - Python version: 3.7
> > - Operating System: Windows 10 Pro 64-bit
> >
> > Description
> >
> > Using the drawing_create command to create and save to windchill a new
> > drawing with the Part Name as the Drawing Name.
> >
> > The drawing is created properly but the name of the selected Drawing
> > Template is used as the name of the new drawing in WindChill. The new
> > drawing has the correct File Name, has the correct Number but does not
> have
> > the correct name in WindChill.
> >
> > ###What I did
> >
> > import creopyson
> > c = creopyson.Client()
> > c.connect()
> > c.server
> > cprint = c.sessionId
> > print("\n" + "session Id = " + cprint)
> > c.drawing_create("bmh_d_eng_detail")
> > c.disconnect()
> >
> > [image: 2020-07-17 14_31_02-HEXBOLT-1_2-13X1_5 Rev_ New 0 0+ In Work
> > (Active) - Creo Parametric]
> > <
>
https://user-images.githubusercontent.com/68441212/87819976-340b4180-c83b-11ea-8fb6-7ba9e21c9588.png
> >
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub
> > <#19>, or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AAMSRJLY26CYKN4MDLTJXJ3R4CLK7ANCNFSM4O6WLQMQ
> >
> > .
> >
>
>
> --
> David Bigelow, President
> Simplified Logic, Inc <https://www.simplifiedlogic.com> |
SimilarParts.ai
> C: 317-431-5454
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#19 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AANPKPHNJTNUDPZC52GYLI3R4DDC5ANCNFSM4O6WLQMQ
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMSRJPRY3WUBLXHZQF4MMLR4D3P7ANCNFSM4O6WLQMQ>
.
--
David Bigelow, President
Simplified Logic, Inc <https://www.simplifiedlogic.com> | SimilarParts.ai
C: 317-431-5454
|
For a CAD document the |
@victoman1234 did you try setting the PTC_COMMON_NAME parameter on the drawing? |
I am not the original user who created this ticket, but I also noticed this issue when creating a drawing. The one thing I was able to figure out is that if I were to manually create the drawing with the same name, model, and template the PTC_WM_NAME parameter is the same as the drawing. When I programmatically create the drawing using the Creopyson.drawing.create function, that is when the PTC_WM_NAME variable autofills the template name for that parameter. That parameter is also locked so I cannot just update it with the correct value. Another thing is that the parameter is only assigned the template name value when I save the drawing. If I just create the drawing in session and do not save, that parameter is empty. However, once I save it, either manually or programmatically, the parameter is assigned the template name. |
Description
Using the drawing_create command to create and save to windchill a new drawing with the Part Name as the Drawing Name.
The drawing is created properly but the name of the selected Drawing Template is used as the name of the new drawing in WindChill. The new drawing has the correct File Name, has the correct Number but does not have the correct name in WindChill.
The text was updated successfully, but these errors were encountered: